how to retrive only second row from table?

Answer Posted / ayan

SELECT * FROM employees a
WHERE 2 = (SELECT COUNT(rowid)
FROM employees b
WHERE a.rowid >= b.rowid);

this will select the 2nd row.. if we write instead of 2 it
will select 8th row.... login to hr/hr schema and run the
code. it will work fine..

Is This Answer Correct ?    3 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is cursor. write example of it. What are the attributes of cursor.

976


What is difference between table and view?

706


how to enter binary numbers in sql statements? : Sql dba

708


ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..

2178


What is the difference between subquery and correlated query?

724






How do we accept inputs from user during runtime?

730


How long will it take to learn pl sql?

689


is mysql query is case sensitive? : Sql dba

775


Does inner join return duplicate rows?

704


What jobs use sql?

721


What is number function in sql?

709


where are cookies actually stored on the hard disk? : Sql dba

787


What is data profiling in sql?

744


What is trigger price?

731


How do you use a while loop in pl sql?

721