Exercise 110.33.13. Give an example of a morphism of integral schemes $f : X \to Y$ such that the induced maps ${\mathcal O}_{Y, f(x)} \to {\mathcal O}_{X, x}$ are surjective for all $x\in X$, but $f$ is not a closed immersion.

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).