Versuchen Sie dies
SELECT id
, Name
, DATEDIFF(yy, CONVERT(DATETIME, DOB), GETDATE()) AS AGE
, DOB
FROM MyTable
Versuchen Sie dies
SELECT id
, Name
, DATEDIFF(yy, CONVERT(DATETIME, DOB), GETDATE()) AS AGE
, DOB
FROM MyTable