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?

Answer Posted / zeljko

This answer_10 will work only if there is not order by used
on select statement.
I recommend using dense_rank function to get second row out
as in example;

SELECT * FROM (
SELECT id, first_name, salary,
DENSE_RANK() OVER(ORDER BY salary desc) row_order
FROM employee)
WHERE row_order = 2;

Is This Answer Correct ?    11 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are triggers in sql?

1020


define join and explain different type of joins? : Sql dba

954


What are the indexing methods?

1049


What are the benefits of stored procedures?

1074


What is a trigger in sql?

1205


what's the difference between a primary key and a unique key? : Sql dba

1050


What is a heap in sql?

1071


How do I clear the screen in sql plus?

1042


what are the 'mysql' command line options? : Sql dba

1072


What is online transaction processing (oltp)?

1017


How we can create a table in pl/sql block. Insert records into it? Is it possible by some procedure or function? Please give example?

1050


How many types of triggers exist in pl/sql?

1073


Show the two pl/sql cursor exceptions.

1199


What is pls integer?

1046


What is sqlite format?

1200