SQL Query

Copper Contributor

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

2 Replies
This board is for things related to Microsoft Learn and Microsoft Certifications. I would recommend reaching out on the SQL Server Community
https://techcommunity.microsoft.com/t5/sql-server/bd-p/SQL_Server
oh thanks.