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 / arjunraj

aa means table-alias name
bb means table-alisa name

select * from emp aa where 2=(select count(distinct empsalary) from emp bb where aa.empsalary<=bb.empsalary)

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 bulk collect in pl sql?

1086


Does oracle roll back the transaction on an error?

1007


How to combine two stored procedures in sql?

1221


Why do we use set serveroutput on?

963


Explain dml and ddl?

986


What are joins in sql?

1041


Can primary key be changed?

903


how to enter characters as hex numbers? : Sql dba

1033


how can we take a backup of a mysql table and how can we restore it. ? : Sql dba

971


Why we use joins in sql?

975


How can we store rows in PL/SQL using array?

1213


What is sql scripting?

1108


What is the use of & in pl sql?

1038


Can we use commit inside a trigger?

1080


Which version of sql do I have?

1050