Metformin prevented SK2 downregulation and SK3 upregulation by inhibiting pERK expression in the atrial tissue of T2DM rats. Here, KCNN3 is linked to type 2 diabetes mellitus.