Thursday 29 March 2018

SQL Query to Get Records of Last Year using SQL Server

SQL Query to Get Records of Last Year using SQL Server

Description:


In this example we explain that how to get records of Last Year using SQL Server. Or SQL Query to get the Last Year record in SQL Server. Or SQL Query to return all records from Previous Year using SQL Server. Or SQL query to select all records created in Last Year. Or how to retrieve Previous Year Records in SQL Server.

Here we demonstrate that how Select Last Year or Previous Year records using SQL Server. Or how to get Last Year from SQL Server.
Query:

SELECT * FROM [dbo].[Order] WHERE  YEAR([Loading Date]) = YEAR(GEtdate())-1


This entry was posted in :

0 comments:

Post a Comment