Let $R$ be a commutative ring, and let $S\subseteq R$ be a subring. Consider a prime ideal $\mathfrak p\subseteq R$ and let $\mathfrak q=\mathfrak p\cap S$ be the restricted prime ideal in $S$. When does the embedding $$ S\hookrightarrow R$$ induce an embedding $$S_\mathfrak q\hookrightarrow R_\mathfrak p?$$ If this is not true in general, under what assumptions does it hold?
By the exactness of localization, we have an embedding $S_\mathfrak q\hookrightarrow S_\mathfrak q\cdot R$, but I don't if this can be extended to $S_\mathfrak qR\to R_\mathfrak p$.