ROW_NUMBER()
Query : To find the record at a particular row
USE NORTHWIND
GO
SELECT *
FROM ( SELECT ROW_NUMBER() OVER(ORDER BY CustomerID) AS cid, CustomerID, CompanyName, ContactName, ContactTitle
FROM Customers) C
WHERE cid = 20
Suprotim has received the prestigous Microsoft MVP award for nine times in a row now. In a professional capacity, he is the CEO of A2Z Knowledge Visuals Pvt Ltd, a digital group that represents premium web sites and digital publications comprising of Professional web, windows, mobile and cloud developers, technical managers, and architects.
Get in touch with him on Twitter @suprotimagarwal, LinkedIn or befriend him on Facebook
1 comment:
Also see what you can do with row_number() function
http://beyondrelational.com/blogs/madhivanan/archive/2007/08/27/multipurpose-row-number-function.aspx
Madhivanan
http://beyondrelational.com/blogs/madhivanan
Post a Comment