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 read 2nd highest sal from EMP table?

Answer Posted / arnab bhui

Using Oracle........

create table emp
( id number(10),
sal numeric(10,5)
);

SQL> select max(sal) from (( select sal from emp ) minus ( select sal from emp where sal >= all ( select sal from emp )));

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is optimization and its types?

953


What command would you use to create an index?

1038


Can I work with several databases simultaneously? : sql server management studio

969


What is Sqlpaging in SqlServer 2005 ?

1045


How to insert multiple rows with one insert statement in ms sql server?

1103


What is the optimization being performed in oracle and SQL Server?

1030


what are the different ways of moving data/databases between servers and databases in sql server? : Sql server database administration

955


Do you know what are acid properties of transaction?

941


What are the differences between char and varchar in ms sql server?

1043


What is query optimizer in sql server?

994


What is a result set object returned by mssql_query()?

1131


How to insert data into an existing table?

961


Sql server reporting services vs. Crystal reports.

131


Explain filtered indexes benefits?

990


How to find the service pack installed? : sql server database administration

1010