select firstname+'.'+lastname as name,
age = DATEDIFF(yy,birthdate,GETDATE())
from employees
where convert(int,age) > 30
order by age desc说是没有列 age
age = DATEDIFF(yy,birthdate,GETDATE())
from employees
where convert(int,age) > 30
order by age desc说是没有列 age
age = DATEDIFF(yy,birthdate,GETDATE())
from employees
where convert(int,(DATEDIFF(yy,birthdate,GETDATE()))) > 30
order by age desc
select firstname+'.'+lastname as name,
age = DATEDIFF(yy,birthdate,GETDATE())
from employees
where convert(int,(DATEDIFF(yy,birthdate,GETDATE()))) > 30
order by DATEDIFF(yy,birthdate,GETDATE()) desc
(
select firstname+'.'+lastname as name,
age = DATEDIFF(yy,birthdate,GETDATE())
from employees
) t
where convert(int,t.age) > 30
order by t.age desc
age = DATEDIFF(yy,birthdate,GETDATE())
from employees
where convert(int,DATEDIFF(yy,birthdate,GETDATE())) > 30
order by age desc