This population‐based cohort study patients included patients who were diagnosed with T2DM and administered either SGLT2 or DPP4 inhibitors between 1 January 2015 and 31 December 2020 in public hospitals of Hong Kong. Here, DPP4 is linked to type 2 diabetes mellitus.