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

What is varchar used for?

1082


What are some predefined exceptions in pl/sql?

1168


what is the use of friend function? : Sql dba

1023


List out the acid properties and explain?

953


What is record type in pl sql?

995


what is sub-query? : Transact sql

1106


How many row comparison operators are used while working with a subquery?

1030


Explain ttitle and btitle.

1120


Are views faster than queries?

992


What is structural independence and why is it important?

1031


What is a recursive join sql?

1076


Can we call dml statement in function?

1056


What is a function in oracle pl sql?

1040


What is the use of sqlerrd 3?

944


what is acid property in database? : Sql dba

1029