Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how to retrive only second row from table?

Answers were Sorted based on User's Feedback



how to retrive only second row from table?..

Answer / saswati

select a.*
from(select e.*,rownum sl_no
from emp e) a
where a.sl_no = 2

Is This Answer Correct ?    0 Yes 0 No

how to retrive only second row from table?..

Answer / anusha

select * from ars_mst_user where rownum<5
minus
select * from ars_mst_user where rownum<=3;

this query for retrive fourth row
same we can retrive any row

Is This Answer Correct ?    0 Yes 0 No

how to retrive only second row from table?..

Answer / sudip chatterjee

If the table is salary.then
SELECT * FROM salary ORDER BY income DESC LIMIT 1, 1;
here income is one attribute of salary table......
just use it.

Is This Answer Correct ?    0 Yes 0 No

how to retrive only second row from table?..

Answer / thanjairajan@gmail.com

select * from emp a where 2=(select count(distinct(b.rowid)) from emp b where a.rowid>=b.rowid;

Is This Answer Correct ?    0 Yes 0 No

how to retrive only second row from table?..

Answer / yogendra

select top 1 * from (select top 3 * from
cmdview_expertmaster order by expid) q order by expid desc

Is This Answer Correct ?    1 Yes 3 No

how to retrive only second row from table?..

Answer / nilesh

hi all,

This will also work fine, try it

select top 1 * from (select top 2 * from table_name)as set
order by set.col_name desc

here table_name is the name of the table from which
you want to retrive the record.
And col_name is the column name by which you are sorting
the records

If it found wrong plz correct it....
and show it on this site

Is This Answer Correct ?    2 Yes 5 No

how to retrive only second row from table?..

Answer / naresh

select * from emp e where 2=(select count(*) from emp where
sal>=e.sal);

Is This Answer Correct ?    0 Yes 3 No

how to retrive only second row from table?..

Answer / 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

how to retrive only second row from table?..

Answer / ehtesham malik

select * from emp
where rowid = (select min(rowid) from emp
where rowid not in (select min(rowid)
from emp)
)

Is This Answer Correct ?    4 Yes 9 No

how to retrive only second row from table?..

Answer / sagar

SELECT * FROM tab a
WHERE :n = (SELECT COUNT(rowid)
FROM tab b
WHERE a.rowid >= b.rowid);

Is This Answer Correct ?    14 Yes 33 No

Post New Answer

More SQL PLSQL Interview Questions

What is the use of sqlerrd 3?

0 Answers  


How do you pronounce sql?

0 Answers  


what are the methods using performance tunning in sql and pl/sql

2 Answers  


How many types of literals are available in pl sql?

0 Answers  


how do you know if your mysql server is alive? : Sql dba

0 Answers  


Can procedure in package be overloaded?

0 Answers   EXL,


Suppose There is a string A.B....C.......D.........E........F In this string dots (.) are not having fixed count in between of string. I want the output to have string with one dot between. I.e. A.B.C.D.E.F

6 Answers   IBM,


Describe the Index, Types of index, At what situation we have used? Which one s better than others?

1 Answers   IBM, TCS,


what is the differnce between procedure and function? in both dml operations can work and in procedure through out parameter you can return value ,then what is the differce?

3 Answers   3i Infotech,


Which type of cursor is used to execute the dml statement?

0 Answers  


What is index example?

0 Answers  


Why we use sql profiler?

0 Answers  


Categories