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 / dev anand s

select salary from (
select salary, dense_rank() over(order by salary desc) rank from emp) where rank=2;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can I create table without primary key?

940


What is clustered and nonclustered index in sql?

896


How to avoid using cursors? What to use instead of cursor and in what cases to do so?

1128


What is trigger in pl sql?

959


What packages(if any) has oracle provided for use by developers?

5718


Why left join is used in sql?

919


What is sql query optimization?

1023


What is the use of sqldataadapter?

911


What are the uses of merge?

1120


what is the difference between mysql_fetch_object and mysql_fetch_array? : Sql dba

989


Explain the types of joins in sql?

966


what is oltp (online transaction processing)? : Sql dba

1016


What is the process of copying data from table a to table b?

1037


Can we call dml statement in function?

980


GLOBAL TEMPORARY TABLE over Views in advantages insolving mutating error?

3010