Forum Discussion

Sqller's avatar
Sqller
Copper Contributor
Aug 31, 2021

SQL Query

Hello Friends

 

I have a query like below which is in Oracle syntax.  How do I write this for SQL server?

Your help is highly appreciated.

 

  1. Display the first name and join date of the employees who joined between 2002 and 2005.

SELECT FIRST_NAME, HIRE_DATE FROM EMPLOYEES WHERE TO_CHAR(HIRE_DATE, 'YYYY') BETWEEN 2002 AND 2005 ORDER BY HIRE_DATE

Resources