0 votes
in Oracle by
Imagine that you have a students table with the columns student_id, student_name, and birthdate. Write an Oracle SQL query to find each student's age (in years) as of today.

1 Answer

0 votes
by
SELECT student_id, student_name,

       EXTRACT(YEAR FROM SYSDATE) - EXTRACT(YEAR FROM birthdate) AS age

FROM students;

Related questions

0 votes
asked Jan 23 in Oracle by SakshiSharma
0 votes
asked Apr 17, 2022 in Apache Drill by sharadyadav1986
...