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

select sal from emp where sal <(select max(sal) from emo)
and rownum<2 order by desc


though rownum which is a pseudo column can be used for
comparisions with relational operators like > or < ,>=, <=
but equalto = may not work in most of the cases..
similarly rowid also.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the order of sql statement execution?

1089


what is an index? : Sql dba

1045


What is group function in sql?

1067


what are the nonstandard string types? : Sql dba

1208


Which join condition can be specified using on clause?

1015


What does stand for in sql?

1026


What are pl sql data types?

1056


Explain scalar functions in sql?

1105


What is the difference between syntax error and runtime error?

1185


How can you save or place your msg in a table?

1042


What are the uses of merge?

1227


What is the difference between left and left outer join?

994


Why is partition used in sql?

1190


What is spool?

1111


Can we insert data into materialized view?

993