Let be a field and consider the ring
-
The ideal
is a prime ideal in of height one. Hence the open subset
is the complement of an irreducible hypersurface. However, is not affine. For this we consider the closed subscheme
-
and
.
If were affine, then also the closed subscheme
would be affine, but this is not true, since the complement of the punctured plane has codimension .