Let $A$ be a commutative ring, and let $\mathfrak p$ be a prime ideal in $A$. When is it true that if $\dim(A/\mathfrak p)=\dim(A)-1$ then $\mathfrak p$ is a principal ideal in $A$?
I'm pretty sure $A$ must be at least an integral domain, and I'm pretty sure that I have a proof when it's a UFD (in that case $\mathfrak p$ must be a minimal nonzero prime, and therefore principal). The question is related to the question of whether or not every codimension $1$ subvariety of an irreducible variety is a complete intersection.