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 sql procedures and functions?

954


What are reports usually used for?

966


can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible? : Sql dba

941


What is the difference between sql and mysql?

1050


what is a constraint? : Sql dba

1104


How much does sql cost?

930


What is offset in sql query?

1068


What is a relationship and what are they?

1049


How do I find duplicates in two columns?

1056


Can we commit in trigger?

920


What is java sql driver?

1037


When you have to use a default "rollback to" savepoint of plvlog?

1123


how to get help information from the server? : Sql dba

874


list out some tools through which we can draw e-r diagrams for mysql. : Sql dba

897


Explain what is a view?

997