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 do you mean by SQL injection attack?

1007


Write a program to fetch first 10 records from a file?

971


How to delete a login name in ms sql server?

1005


Can sql servers link to other servers like oracle?

794


You want to implement the one-to-many relationship while designing tables. How would you do it?

913


do views contain data ?

913


What are the dmvs? : sql server database administration

1005


Which joins are sql server default?

939


What are the types of user defined functions in sql server?

991


What is difference between equi join and natural join?

969


Why we need sql server?

915


What is inline table-value user-defined function?

1012


Explain transaction server explicit transaction?

879


Distinguish between commit and rollback?

901


Can you roll back the ddl statement in a trigger?

915