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

Is postgresql a server?

1044


when MSQL8.0 is in market

2072


What is rowid in sql?

978


What is dcl in sql?

956


What is a rank in sql?

957


Can you sum a count in sql?

998


what is unique key constraint? : Sql dba

1033


Why partition by is used in sql?

1035


Can we insert data in view?

955


What are the types of keys?

989


how to decrement dates by 1 in mysql? : Sql dba

1014


how to use 'mysql' to run sql statements? : Sql dba

1051


What is before and after trigger?

955


What is case function?

1034


Write an sql query to select all records from the table?

1022