How to select nth record from a table?

Answer Posted / sajida

--For ex in dept table to select 5th record. Instead of
this you can use &n so that it can ask row number

select rnum, d.* from dept d, (select rownum rnum ,
deptno from dept ) e
where d.deptno = e.deptno and rnum = 5

Is This Answer Correct ?    5 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a database be shrunk with users active?

596


Give a example to search fr a string in all stored procedure in sql server.

532


How to scale out a federation by Sql statement?

92


What options are available to audit login activity? : sql server security

633


Are there any preferred steps that need to be taken care of before starting the installation of sql server 2000?

564






What is a field in a table?

574


What are the different subsets of sql?

947


What do you mean by collation recursive stored procedure?

587


What is pivot and unpivot?

638


What is sql or structured query language?

677


what information is maintained within the msdb database? : Sql server administration

509


How to replace given values with null using nullif()?

574


What is Service Broker in sql server 2012?

616


Is candidate a key?

531


List out the different types of locks available in sql server?

552