Let $V_1,V_2$ be irreducible analytic subvarieties of a complex manifold $M$. Suppose there exists $p\in V_1\cap V_2$ and a neighborhood of $p$ in $M$ such that $V_1\cap U=V_2\cap U$. Does it imply $V_1=V_2$?
A related question is the following:
Let $V_1,V_2$ be irreducible analytic subvarieties of a complex manifold $M$ with $\dim V_1=\dim V_2$. Suppose $V_1\subset V_2$. Does it imply $V_1=V_2$?
Here an analytic (sub)variety is a closed subset locally given as the zero sets of finitely many holomorphic functions. An analytic variety is irreducible if it is not the union of two proper analytic subvarieties. The dimension of an analytic variety is defined to be the dimension of its regular locus (i.e., the set of smooth points) as a complex manifold.
I encountered these problems when trying to show that $H^0(M,\mathcal{M^*/O^*})\cong\operatorname{Div}(M)$, where $\mathcal{M}^*$ is the sheaf of nonzero meromorphic functions, $\mathcal{O}^*$ the sheaf of nowhere vanishing holomorphic functions, and $\operatorname{Div}(M)$ the group of divisors defined as the free abelian group generated by irreducible analytic hypersurfaces on $M$ (when $M$ is compact). To prove this one constructs explicit homomorphisms and show that they are mutual inverses. Given a divisor $D$ on $M$, which we shall, for simplicity, assume to be just an irreducible analytic hypersurface $V$, one constructs a section of $\mathcal{M^*/O^*}$ by the local defining functions: Suppose $V$ is given by the zero locus of $f_\alpha$ on $U_\alpha$, where $\bigcup_\alpha U_\alpha=M$, we have $f_\alpha/f_\beta\in\mathcal{O}^*(U_\alpha\cap U_\beta)$, so $(f_\alpha)_\alpha$ defines an element in $H^0(M,\mathcal{M^*/O^*})$. I want to show that the divisor defined by $(f_\alpha)_\alpha$ is just $V$. However, if there is another irreducible analytic hypersurface $V'$ such that $V'\cap U=V_2\cap U\neq\varnothing$ for some open set $U$, then by the definition of divisors associated to meromorphic functions, the divisor of $(f_\alpha)_\alpha$ would contain the term $V'$, which contradicts what we want to prove. Thus I guess this cannot happen, i.e., $V'$ must $=V$. (This proof appears in both Griffiths & Harris Principles of Algebraic Geometry and Huybrechts's Complex Geometry, but they both omit the verification that these maps are indeed mutual inverses.)
I have been unable to prove or disprove the above statements, probably due to my lack of knowledge about analytic varieties. In case the above statements are false in general, are they true for hypersurfaces?
Any help is appreciated!