When compared with patients without NAFLD, those with NAFLD were younger (P < 0.001) and had a shorter T2DM disease course (P < 0.001), higher BMI (P < 0.001), larger waist circumference (P < 0.001), greater WHR (P < 0.001), lower HDL-C (P < 0.001), and higher DBP (P = 0.031), TC (P < 0.010), TG (P < 0.001), 2hPG (P = 0.032), FINS (P < 0.001), HOMA-IR (P < 0.001), ALT (P < 0.001), GGT (P < 0.001), AST (P < 0.001) and eGFR (P = 0.021). Here, GPT is linked to type 2 diabetes mellitus.