Published on April 20, 2017
Link for all dot net and sql server video tutorial playlists
Link for slides, code samples and text version of the video
This question is asked is many sql server interviews. If you have used DATEDIFF() sql server function then you already know the answer.
— Replace N with number of months
Select *
FROM Employees
Where DATEDIFF(MONTH, HireDate, GETDATE()) Between 1 and N