Suppose $f: A \rightarrow B$ is a local homomorphism of local rings. Assume that $A$ and $B$ are noetherian, regular and $\mathrm{Spec} B \rightarrow \mathrm{Spec} A$ is quasi-finite. Is is necessary that $f$ is flat?

Obviously not. But this looks like homework, and anyways is not appropriate for mathoverflow. Try math.stackexchange.com instead? Or consider a closed immersion.
–
Will SawinJun 4 '12 at 0:09