Prilosec over nexium?

Brooke
Before getting pregnant I had been on nexium for years, but once I got pregnant they told me to stop taking it and try Zantac which did not work. So, my doctor suggested Prilosec, which has worked for me. I have done a lot of research and Prilosec (omeprazole) is said to be a class C drug whereas Nexium (esomeprazole) is a class B. I'm just confused as to why they didn't have me continue Nexium - if it is said to be safer? Anyone have any knowledge on this, since all my doctor has said is that she prefers prescribing the Prilosec over Nexium and that it is perfectly safe.