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 / neeraj

SELECT DISTINCT(SAL) FROM EMP
WHERE SAL=(SELECT MIN(SAL) FROM (SELECT SAL FROM EMP ORDER
BY SAL DESC)
WHERE ROWNUM<=2);

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is there a need for sqlcode and sqlerrm variables?

1053


what is a stored procedure? : Sql dba

1138


Can ddl statements be used in pl/sql?

1146


Explain the difference between drop and truncate commands in sql?

1056


How to rename a column in the output of sql query?

1072


How you can copy a file to file content and file to pl/sql table in advance pl/sql?

1150


what is a tablespace? : Sql dba

1057


What is gpt format?

943


What is mutating error?

972


What is sql prepared statement?

989


Explain foreign key in sql?

1036


How bulk collect improves performance?

1011


What is plpgsql language?

1068


What are the possible values for the boolean data field?

964


What is pivot in sql?

918