Intersection of two localizations Let $A$ be a commutative ring with unity. If $\mathfrak p,\mathfrak q\in \operatorname{Spec} (A)$ is it true the following equality 

$$A_\mathfrak p\cap A_\mathfrak q= A_{\mathfrak p\cup \mathfrak q }?$$

Here the symbol $A_{\mathfrak p\cup \mathfrak q }$ means the localization $S^{-1}A$, where $S=A\setminus (\mathfrak p\cup \mathfrak q)$. 
EDIT: $A$ is a domain and we can embed $A_\mathfrak p$ and $A_\mathfrak q$ in $Q(A)$.
 A: You cannot intersect two arbitrary abstract rings. They have to be subrings of a larger ring in order to do that. 
If $A$ is an integral domain (which I will assume from now on), then localizations $\neq 0$ of $A$ can be embedded into the field of fractions $Q(A)$ and their intersection makes sense. (EDIT: This paragraph was refering to the first version of the question)
The inclusion $S \subseteq A \setminus \mathfrak{p}$ gives a map of $A$-algebras $A_{\mathfrak{p} \cup \mathfrak{q}} \to A_{\mathfrak{p}}$. Likewise for $\mathfrak{q}$. Thus, we have $A_{\mathfrak{p}\cup \mathfrak{q}} \subseteq A_{\mathfrak{p}} \cap A_{\mathfrak{q}}$.
I don't know if the other inclusion holds in general. But here are two simple special cases:


*

*$\mathfrak{p} \subseteq \mathfrak{q}$ or $\mathfrak{q} \subseteq \mathfrak{p}$

*$A$ is factorial and $\mathfrak{p}$ and $\mathfrak{q}$ are principal.


Proof: We may assume $\mathfrak{p},\mathfrak{q} \neq 0$, so that $\mathfrak{p}=(p)$ and $\mathfrak{q}=(q)$ for prime elements $p,q$. If $x \in A_{\mathfrak{p}} \cap A_{\mathfrak{q}}$, choose $a,b,c,d \in A$ with $p \nmid b$, $q \nmid c$ and $x=a/b=c/d$. We may assume that $a,b$ and $c,d$ are coprime. Then $a$ is associated to $c$ and $b$ is associated to $d$. In particular, $q \nmid b$ and we have $x=a/b \in A_{\mathfrak{p} \cup \mathfrak{q}}$.
I suspect that it also holds when the prime ideals are coprime (i.e. $\mathfrak{p}+\mathfrak{q}=A$), but at the moment I cannot prove it.
A: I assume that $A$ is an integral domain. As @MartinBrandenburg noticed $S^{-1}A\subseteq A_{\mathfrak{p}} \cap A_{\mathfrak{q}}$. (Here $S=A-\mathfrak{p}\cup \mathfrak{q}$.)  
Let $x\in A_{\mathfrak{p}} \cap A_{\mathfrak{q}}$. Then there is $s\in A-\mathfrak p$ and $t\in A-\mathfrak q$ such that $sx\in A$ and $tx\in A$. If $\mathfrak p\not\subseteq\mathfrak q$ and $\mathfrak q\not\subseteq\mathfrak p$, take $p\in\mathfrak p-\mathfrak q$ and $q\in\mathfrak q-\mathfrak p$. Set $u=qs+pt$. Then $u\notin \mathfrak p\cup \mathfrak q$ and obviously $ux\in A.$ It follows that $x\in S^{-1}A$. 
If $\mathfrak p\subseteq \mathfrak q$ or viceversa the equality is clear.
Remark. Using similar arguments one can prove the following:

Let $A$ be an integral domain and $\mathfrak p_1, \dots,\mathfrak p_n$ prime ideals of $A$ such that $\mathfrak p_j\not\subseteq \bigcup_{i\neq j}\mathfrak p_i$. Set $S=A-\bigcup_{i=1}^n\mathfrak p_i$. Then $S^{-1}A=\bigcap_{i=1}^nA_{\mathfrak p_i}$.

