I have looked online and through my book, with no luck on finding the command. It is the final part of the problem. "Display the current ages of all the employees." My table and columns are.
Table: Employee
Columns: Names(VARCHAR(20),null),
Address(VARCHAR(20),null),
Employee_Number(INT,null),
Salary(SMALLMONEY,null),
Birthdate(DATE,null),
Employment_Date(DATE,null).
Everything I have found online is to convert one or two birth dates into age. Is there a command to convert multiple ones with out typing in the birth date into the query?
DECLARE @dob datetime
SET @dob= '1992-01-09 00:00:00"
Would I have to do
SELECT NAMES
DECLARE @dob date
SET @dob= 'yyyy-mm-dd'
Something like this, I think there is 37 lines of names that I would need to convert there birth date into age.
Any help is much appreciated, thanks in advance for help.