Both Prilosec and Nexium are proton pump inhibitors. Zegrid is the trade name of Omeprazole, and Omeprazole is the generic name. This medication is used to inhibit acid secretion in the stomach. There are some risks associated with this medication. Clinical research has shown that Prilosec has been reported to increase bone fractures in the wrists, hips, and spine. Long term use may interfere with vitamin-12 absorption, and it may even lead to a deficiency. Nexium is another medication used to inhibit acid secretion in the stomach. The generic name for Nexium is esomeprazole. Some of the adverse effects include kidney problems, diarrhea, low magnesium, and muscle spasms in your hands and feet. According to research, Nexium is more effective and better protects the stomach from acid, and it works faster than Prilosec.