# Codimension of the complement of a quasi-affine open subset of a variety

It is a known fact from Algebraic Geometry that the complement of an affine open subset of a variety is of pure codimension one. Does the same hold for the complement of a quasi-affine open subset of a variety? I don't know much about codimension, so I hope that this question is not trivial.

-
Is it Ok for affine variety ? If yes then this is enough since the dimension if a local notion. –  Lierre Jul 20 '12 at 12:26

If $V$ is affine, and $Z$ is closed in $V$, then $V\setminus Z$ is quasi-affine (it is open in the affine variety $V$), and its complement in $V$ is $Z$, which has whatever codimension it has. (Anything up to the dimension of $V$.) So there is no real constraint on the codimension of the complement of a quasi-affine open.