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...

Write a query to find second highest salary of an employee.

Answer Posted / deepshikha

SELECT MAX (sal)
FROM emp a,
(SELECT MAX (sal) max_sal
FROM emp) abc
WHERE a.sal < abc.max_sal
ORDER BY sal DESC;

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a procedure in pl sql?

1163


Which table is left in join?

934


Why do we need cursors in pl sql?

1030


Can a table have no primary key?

1023


What are the different dcl commands in sql?

1101


How do I start sql from command line?

984


What is the difference between alter trigger and drop trigger statements?

1072


Why cross join is used?

1044


What is the difference between view and stored procedure?

936


define data blocks ? : Sql dba

949


How do I count rows in sql?

968


what are the properties and different types of sub-queries? : Sql dba

999


What is the advantage of index in sql?

927


Differentiate between % rowtype and type record.

1248


How can you fetch first 5 characters of the string?

983