Stomach ulcer surgery can be highly effective in treating ulcers, especially when other treatments have not been successful. However, it's important to note that surgery does not guarantee a permanent cure. Lifestyle modifications, such as managing stress, avoiding certain medications, and adopting a healthy diet, may still be necessary to prevent future ulcers from developing.