A Research Study Comparing a New Medicine Oral Semaglutide to Sitagliptin in People With Type 2 Diabetes

This study compares 2 medicines for type 2 diabetes: oral semaglutide (a new medicine) and sitagliptin (a medicine doctors can already prescribe). Participants will either get oral semaglutide or sitagliptin - which treatment is decided by chance. Participants will get 2 tablets a day to take first thing in the morning on an empty stomach. Only 1 tablet has study medicine in it. The other tablet is a dummy medicine (placebo). After taking the semaglutide tablet, participants may not eat or drink anything for at least 30 minutes. After the 30 minutes, participants must take the sitagliptin tablet. Then participants can have their first meal of the day and take any other medicines they may need, including their metformin. The study will last for about 7 months (33 weeks). Participants will have 8 clinic visits and 1 phone call with the study doctor. At all 8 of the clinic visits, participants will have blood samples taken.


Eligibility Criteria:
Inclusion Criteria:

* Informed consent obtained before any trial-related activities. Trial-related activities are any procedures that are carried out as part of the trial, including activities to determine suitability for the trial.
* Male or female, age above or equal to 18 years at the time of signing informed consent.

For Algeria only: Male or female, age above or equal to 19 years at the time of signing informed consent.

For Taiwan only: Male or female, age above or equal to 20 years at the time of signing informed consent

* Diagnosed with type 2 diabetes mellitus 60 days or more prior to day of screening.
* HbA1c between 7.0-10.5% (53-91 mmol/mol) (both inclusive).
* Stable daily dose of metformin (equal to or above 1500 mg or maximum tolerated dose as documented in the subject medical record) 60 days or more prior to day of screening

Exclusion Criteria:

* Female who is pregnant, breast-feeding or intends to become pregnant or is of child-bearing potential and not using a highly effective contraceptive method (adequate contraceptive measure as required by local regulation or practice).
* Family or personal history of multiple endocrine neoplasia type 2 (MEN 2) or medullary thyroid carcinoma (MTC). Family is defined as a first degree relative.
* History or presence of pancreatitis (acute or chronic).
* History of major surgical procedures involving the stomach potentially affecting absorption of trial product (e.g. subtotal and total gastrectomy, sleeve gastrectomy, gastric bypass surgery).
* Any of the following: myocardial infarction, stroke, hospitalization for unstable angina or transient ischaemic attack within the past 180 days prior to the day of screening and randomisation.
* Subjects presently classified as being in New York Heart Association (NYHA) Class IV.
* Planned coronary, carotid or peripheral artery revascularisation known on the day of screening.
* Renal impairment measured as estimated glomerular filtration rate (eGFR) below 60 mL/min/1.73 m\^2 as per Chronic Kidney Disease Epidemiology Collaboration formula (CKD-EPI).
* Subjects with alanine aminotransferase (ALT) above 2.5 x upper limit of the normal (ULN).
* Uncontrolled and potentially unstable diabetic retinopathy or maculopathy. Verified by a pharmacologically pupil-dilated fundus examination performed by an ophthalmologist or another suitably qualified health care provider within the past 90 days prior to screening or in the period between screening and randomisation. Fundus examination without dilation is only allowed if the digital camera used for fundus photography has this feature.
* Presence or history of malignant neoplasms within the past 5 years prior to the day of screening. Basal and squamous cell skin cancer and any carcinoma in-situ is allowed.