How to add condition into new column that just added? -SQL- -


query below

select fname,lname,datediff(yy,birthdate,getdate()) age employee age = 72 

but there error says --> "invalid column name 'age'.

how can solve it? thank you!

just repeat expression in where clause:

select fname,     lname,     datediff(yy, birthdate, getdate()) age employee datediff(yy, birthdate, getdate()) = 72 

Comments