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 do I run a pl sql program?

1064


How many subqueries can be nested in a statement?

933


How can you fetch common records from two tables?

1001


Explain select statements in sql?

999


What is scalar data type in pl sql?

1019


What is structural independence and why is it important?

978


How do you use join?

887


What is the difference between clustered and non-clustered index in sql?

957


Write a query to display the current date in sql?

967


What is a record in pl/sql?

1070


what are the differences between get and post methods in form submitting. Give the case where we can use get and we can use post methods? : Sql dba

1084


What is self-join and what is the requirement of self-join?

1088


What is a recursive join sql?

1026


define sql delete statement ? : Sql dba

970


What is recursive join in sql?

946