sql 根据身份证号码计算年龄 select PersonalId ,FLOOR(DATEDIFF(DY, substring(PersonalId,7,4), GETDATE()) / 365.25) from ConstructionInfo