This type of medication is often prescribed as a last resort. In fact, some doctors discourage prescribing it due to the addictive effects of their long-term use. Some examples of opioids are codeine, hydromorphone, oxycodone, morphine, and tramadol. Although tramadol may be viewed as the safest option among the four, it is still considered as habit-forming if used for a long time. The known side effects of opioids are constipation, drowsiness, nausea, and vomiting.