CBSE Class 12 Informatics Practices Question 54 of 79

Database Query using SQL — Question 12

Back to all questions
12
Question

Question 12

Consider two fields—B_date, which stores the birth date, and J_date, which stores the joining date of an employee. Write commands to find out and display the approximate age of an employee as on joining date.

Answer
SELECT (YEAR(J_DATE) - YEAR(B_DATE));