how to retrive only second row from table?

Answer Posted / amedela chandra sekhar

SQL> select * from (select rownum as rno,emp.* from emp)
2 where rno=&n;
Enter value for n: 2
old 2: where rno=&n
new 2: where rno=2

RNO EMPNO ENAME JOB MGR
HIREDATE SAL
---------- ---------- ---------- --------- ----------
--------- ----------
COMM DEPTNO
---------- ----------
2 7499 ALLEN SALESMAN 7698
20-FEB-81 1600
300 30

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What's the procedure?

481


Which is faster joins or subqueries?

543


What is pls integer?

577


What is a sql*loader control file?

611


How do you optimize a stored procedure in sql?

493






How to rename a column in the output of sql query?

526


How to take user input in pl sql?

691


what is error ora-03113: end-of-file on communication channel?

592


Explain the components of sql?

581


What is the difference between a primary key and a clustered index?

514


Can we commit in trigger?

539


What is interval partition?

537


Is sql free?

493


Why stored procedures are faster than query?

557


what is the command line end user interface - mysql? : Sql dba

494