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

How many triggers can be applied to a table?

1039


How can get second highest salary in sql?

965


What is difference between inner join and cross join?

953


Why do we need cursor in pl sql?

1121


Can there be more than one function with a similar name in a pl/sql block?

969


Can I join the same table twice?

1032


what does myisamchk do? : Sql dba

1002


What is the difference between stored procedure and view?

1008


What is the usage of nvl function?

1025


What is scope of pl sql developer in future?

992


How do I run a script in sql developer?

936


What is numeric function sql?

1043


What is data manipulation language?

1174


How do I edit a stored procedure?

980


How do I create an index in word?

1010