we have emp table like Ename,EDOJ,EDOB with Column
structure.but we want to know the employee Age.How? Any
Body Plz

Answer Posted / monal

FOR SQL 2005:

select datediff (day, birthdate, getdate())/365 from emp

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a non clustered primary key?

669


How to execute the cursor queries with "open" statements?

833


You want to use a perspective in an mdx query. How do you select the perspective?

185


What is the maximum size per database for sql server express?

742


What is the difference between a clustered index and a non-clustered index?

710






What is the security model used in sql server 2005?

694


How to rename an existing column with the "sp_rename" stored procedure in ms sql server?

779


Do you know what is bit data type and whats the information that can be stored inside a bit column?

721


What is use of attributehierarchyenabled? : sql server analysis services, ssas

797


How to insert and update data into a table with "insert" and "update" statements?

699


What are secondary xml indexes?

783


What is database white box testing?

840


Can we write ddl in trigger?

650


If you are given access to a SQL Server, how do you find if the SQL Instance is a named instance or a default instance?

841


What are the rules to use the rowguidcol property to define a globally unique identifier column?

748