Informatics Practices
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.
SQL Queries
3 Likes
Answer
SELECT (YEAR(J_DATE) - YEAR(B_DATE));
Answered By
3 Likes
Related Questions
Write command to print the day of the week of your Birthday in the year 1999.
What is the difference between sysdate() and now() functions ?
Write a query to find out the number of students in each Stream in STUDENT table.
Consider the given table Faculty and answer the questions that follow:
Table: FACULTY
F_ID F_Name L_Name Hire_date Salary 102 Amit Mishra 1998-10-12 10000 103 Nitin Vyas 1994-12-24 8000 104 Rakshit Soni 2001-05-18 14000 105 Rashmi Malhotra 2004-09-11 11000 106 Sulekha Srivastava 2006-06-05 10000 (a) To display the details of those Faculty members whose salary is higher than 12000.
(b) To display the details of Faculty members whose salary is in the range of 8000 to 12000 (both values included).
(c) Count the number of different ids from faculty.
(d) Count the number of faculty members getting salary as 10000.
(e) Display details of those faculty members whose names start with S.
(f) Display all records in descending order of Hire date.
(g) Find the maximum and the minimum salary.
(h) Select CONCAT(F_Name, L_Name) from FACULTY;
(i) Select Month(Hire_date) from FACULTY;