If I have a SQL Table called Persons
that contain about 30000 rows and I want to make a SQL query that retrieve the data of row number 1000 ... I got it by non professional way by making the following query
Select Top 1 * from
(
Select top 1000 *
From Persons
Order By ID
)A
Order By A.ID desc
But I feel that's a more optimized query that can do that ... can any lead me to perfect query ?
Note : table contain PK column called "ID" but it's not sequential