1、计算年龄的方法
SELECT c_ID,c_Name,c_TrueName,c_Password,( YEAR(GETDATE())-YEAR(c_Birth)) AS 年龄 FROM dbo.Customers
结果如下: