How to look at two dates in SQL?

509    Asked by FujiwaraBan in SQL Server , Asked on Mar 5, 2021
Answered by Fujiwara Ban

We can contrast two dates utilizing rises to with, not exactly, and more prominent than Administrators in SQL. Here are the models contrasting dates in SQL:

If you want to find the employees joined on April 28th, 2020 from employee table:

SELECT E_id, E_name from Employee where join_date = ‘2020-04-28’;

You can use the less than and greater than operators in a similar way.

Here is the statement to find employees who joined between March 28th, 2020 and April 28th, 2020:

SELECT E_id, E_name from Employee where join_date between ‘2020-03-28’ and ‘2020-04-28’;



Your Answer

Interviews

Parent Categories