Write an SQL query to retrieve the names of employees who joined in the year 2021.

Last Updated :
Discuss
Comments

Write an SQL query to retrieve the names of employees who joined in the year 2021.

SELECT name FROM employees WHERE JOIN_YEAR = 2021;

SELECT name FROM employees WHERE JOIN_DATE LIKE '2021%';

SELECT name FROM employees WHERE YEAR(JOIN_DATE) = 2021;

SELECT name FROM employees WHERE JOIN_DATE BETWEEN '2021-01-01' AND '2021-12-31';

Share your thoughts in the comments