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 the second highest salary of the emp table

Answer Posted / ramesh.ch

select max(salary) from emp
where salary< ( select max(salary) from emp)


explanation::

first sub query returns maximum salary of employee
than main query returns maximum salary lessthan the maximum
salary return by subquery

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Whether any commands are used for months calculation? If so, what are they?

1099


Tab A A B ------ 1 A 2 B 3 C Tab B A B ----- 4 D 5 E 6 F Generate the value into B table from A table. Only table A has the value. Write the SQL query to get B table value.

1792


Is primary key indexed by default in oracle?

994


What privilege is needed for a user to create views in oracle?

1058


What is transport network substrate (tns) in oracle?

1050


What is object data modeling?

971


How do we get field details of a table?

983


how the indexes are stored in the Oracle Database?

2277


What are operators in oracle?

1065


Which environment variables are absolutely critical in order to run the OUI?

2124


How would you configure your networking files to connect to a database by the name of DSS which resides in domain icallinc.com?

1925


How to upsert (update or insert into a table)?

1006


What is an oracle data file?

1113


What is the difference between $oracle_base and $oracle_home?

1094


How to rebuild an index in oracle?

1033