Submitted Questions

  • Query to find the list of employees age > 30

    Write a query to find the list of employees whos age is greater than 30 or so given a date of birth column

    Shailesh Bhilare

    • Dec 6th, 2021

    There is a table employee (empid,empname,DOB). Get the emp count against the age bracket of less than or equal to 30 and above 30.

    Could you pls give the oracle syntax for tge above Query..?

    Piyush Kumar

    • May 4th, 2019

    Curdate() will give you the current date. here we are subtracting from dob to current date(year).

    Code
    1. SELECT * FROM USER WHERE (YEAR(CURDATE()) - YEAR(DOB))>30;