-
selecting nth row
quick and simple question really,
if you have a table and want to see the 6th row only
how will you do it?
thanks
Shaunt
-
any unique column in the table? please post sample data
-
You should at least have a criteria column for sorting.
select top 1 * from (select top 5 * from TBName order by Id)a order by Id desc
In this example, ID is used for sorting
-
Check this out
Asumming your Table is "myemp" and ID is used for sorting
select *
from (select * from myemp where rownum<7 order by ID desc) a
where rownum<2
order by ID
Regds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|