|
|
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
Did you like this post?
|
|
|
||
|
|
|
|
|
|
|
subscribe via rss |
|
subscribe via e-mail |
|
|
print this post |
|
follow me on twitter |






comments
1 Response to "How to retrieve record from a specific row for tables that do not have an ID"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