Given a non-constant analytic function $f(x)$ on a domain $D \subseteq \mathbb{R}^n$. I want to prove that
$\mathcal{Z} = \{x \in \mathcal{D} |f(x) = 0 \}$
is closed nowhere dense.
I originally wanted to prove this by contradiction as follows using the identity theorem.
"Assume that $\mathcal{Z}$ is not a closed nowhere dense set, then $\mathcal{Z}$ must contain a limit point", which shows that $f(x)$ is constant zero by the identity theorem and thus contradicts that $f(x)$ is non-constant.
However, I am not sure if the following statement is true:
"Assume that $\mathcal{Z}$ is not a closed nowhere dense set, then $\mathcal{Z}$ must contain a limit point"
If it is true, could you provide one reference?
If not, is $\mathcal{Z}$ closed nowhere dense, and how can I prove it?