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

find out the second highest salary?

Answer Posted / thananjayan

SELECT * FROM 'emp` WHERE salary < ( SELECT max( salary
)FROM emp ) ORDER BY salary DESC LIMIT 1

This is Mysql syntax, if you use Oracle just remove LIMIT 1
and put it ROWNUM=1;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to write numeric literals in oracle?

1130


How many objectname will be created for a single table drop function? Why 'flashback' query giving error "ORA-38312: original name is used by an existing object" while getting the table?

2205


Explain a synonym?

975


Explain drop constraint oracle?

994


Why packages are used in oracle?

1004


How to rename a column in an existing table?

977


How to drop an existing table in oracle?

1015


Explain what are the uses of rollback segment?

964


How to call a stored function in oracle?

954


Why do you use stored procedures and state some of its disadvantages?

972


What's dateware house and what's clustor with practicle example

2129


What happens to the data files if a tablespace is dropped?

997


Compare and contrast between sql and sql server and explain its various functions?

920


what are the advantages of running a database in archive log mode?

2144


What is set verify off in oracle?

1034