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 get second highest salary in SQL(as/4000

Answer Posted / amedela chandra sekhar

SQL> select * from emp where sal=(select max(sal) from emp
2 where sal<(select max(sal)from emp));

EMPNO ENAME JOB MGR HIREDATE
SAL COMM
---------- ---------- --------- ---------- ---------
---------- ----------
DEPTNO
----------
7788 SCOTT ANALYST 7566 19-APR-87 3000
20

7902 FORD ANALYST 7566 03-DEC-81 3000
20

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between rollback and rollback to statements?

1060


how do you tune the slow running queries in oracle db , explain the methodology

2714


What is trigger in sql? Explain

992


Can we delete column in sql?

1089


How does postgresql compare to "nosql"?

1029


Which nosql database is best?

973


Differentiate between % rowtype and type record.

1293


What is meant by temporal data?

963


How many scalar data types are supported in pl/sql?

1049


Explian rowid, rownum?

1007


What is cursor in pl sql?

1114


discuss about myisam key cache. : Sql dba

1019


how to shut down the server with 'mysqladmin'? : Sql dba

1007


what is the difference between cluster and non cluster index? : Sql dba

1023


What view means?

975