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...

Write a query to get 2nd maximum salary in an employee table ?

Answer Posted / surajit pathak

select * from emp e1
where 2>(select count(1) from emp e2
where e2.sal>e1.sal)
order by sal desc

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

tell me about various levels of constraint. : Sql dba

1031


Is primary key always clustered index?

1014


Why do we need cursors in pl sql?

1074


What is exception? What are the types of exceptions?

1068


Write a sql query to find the names of employees that begin with ‘a’?

1005


What do you mean by query optimization?

996


Can you select everything, but 1 or 2 fields, without writer's cramp?

979


How do we use distinct statement? What is its use?

1027


What is the sql query to display the current date?

1038


What are the advantages of indexing?

980


What is a heap in sql?

1061


how to show all tables with 'mysql'? : Sql dba

1111


Is sql open source?

970


What is nested table in pl sql?

1063


Are there any features that are decommissioned in 11g that are not present in 11g?

2140