This is New Feature in SQL Server 2012 i see this feature is very good .
OFFSET command —- provides a starting point for the SELECT statement , Form where the Select will begin
FETCH command —– provides how many records to return at a time
in SQL Sever 2012
Use AdventureWork
GO
SELECT Name,ModifiedDate FROM Production.Culture
ORDER BY name
offset 2 rows ——- Select the rows from tha table expected the 2 rows
FETCH NEXT 3 ROWS ONLY — show the first 3 rows from the result return after the OFFSET Command
IF you want to make this statment in Oldest Version you will make it like this
Use AdventureWork
GO
SELECT top 3 Name,ModifiedDate FROM Production.Culture
where name not in (‘Arabic’,’Chinese’)
ORDER BY name

Like this:
Like Loading...
Related
Published by Mustafa EL-Masry
I am Microsoft database consultant working as a Database administrator for more than +10 Years I have very good knowledge about Database Migration, Consolidation, Performance Tuning, Automation Using T-SQL, and PowerShell and so many other tasks I do it in multiple customers here in KSA and as of now, I am working in Bank Albilad managing the core banking system that is hosted in SQL Server Database 8 TB. Also, I am Microsoft certified 2008 and 2016 in SQL Server (2x MCTS, 2x MCTIP, MCSA, MCSE) and I am Microsoft Certified Trainer (MCT) also I am azure Certified (AZ-900, AZ-103) also I was awarded by Microsoft Azure Heroes 3 times as (Azure Content hero, Azure Community hero and Azure Mentor) For more information check my page
https://mostafaelmasry.com/about-me/
View all posts by Mustafa EL-Masry