How to find nth record in a table using sqlserver.
-
Hi all, i want to know How to find exact record in my table. ex : in a table having 10 records. i want 5 th record. with out knowing details containg in a table how can i find it. only know table name. pls help me.
-
Hi all, i want to know How to find exact record in my table. ex : in a table having 10 records. i want 5 th record. with out knowing details containg in a table how can i find it. only know table name. pls help me.
Here u get the 5th record SELECT TOP 1 FName FROM ( SELECT TOP 5 FName FROM Names ORDER BY FName Desc )
-
Hi all, i want to know How to find exact record in my table. ex : in a table having 10 records. i want 5 th record. with out knowing details containg in a table how can i find it. only know table name. pls help me.
-
Here u get the 5th record SELECT TOP 1 FName FROM ( SELECT TOP 5 FName FROM Names ORDER BY FName Desc )
hi Prasad, Thanks for u r valuable solution, its working by making some modifications. this is working properly SELECT TOP 1 sal FROM prs where sal in (SELECT TOP 4 sal FROM prs ORDER BY sal )order by sal desc all the best