QuestionQ136

VerifiedRestricting and sorting data

Examine the description of the EMPLOYEES table:

Question Image

The session time zone matches the database server time zone.

Which two statements list only employees who have worked for the company for more than five years?

Choose two
Explanation

In Oracle, subtracting one DATE from another produces the elapsed number of days. Dividing that value by 365 and testing whether it exceeds 5 selects employees whose hire date is more than five years earlier. When the session and database server time zones are the same, CURRENT_DATE and SYSDATE provide the same current-date basis for this calculation.

Community Discussion

No comments yet. Be the first to start the discussion!