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 find the second highest salary from emp table?

Answer Posted / vijay kintali

select e1.ename,e1.sal from emp e1 where n=(select count
(distinct e2.sal) from emp e2 where e1.sal<=e2.sal);

Note:n here is nth highest salary.......

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What type of join is sql join?

922


Why is theta join required?

1080


What is a temporal table?

881


Which are the different character-manipulation functions in sql?

987


Explain the uses of control file.

990


what is cursor and its type, what is ref cursor write a syntax to pass ref cursor into procedure out fucntion and call the procedure

1089


How do I run a program in pl sql?

951


Will truncate release space?

887


What is bulk collect in pl sql?

1019


What is gpt format?

894


Is natural join and inner join same?

853


Why functions are used in sql?

927


What are few of the schema objects that are created using PL/SQL?

968


What are stored procedures in mysql?

968


What is difference between stored function and application function?

1102