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

Given an employee table, how would you find out the second
highest salary?

Answer Posted / trived

select * from emp
where n-1 = (select count(*) from emp e
where emp.salary<e.salary)

in place of n-1 you can keep zero for first hight salary
and 1 for second hightest salary.....etc

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is DB Development software?

2118


What is the maximum length of an extended property?

1036


Explain the cube operator?

1060


What are data modelling techniques?

1027


Which four data types cannot be used as a return type from a user-defined function?

1063


What are the types of database model?

1138


What are the 18 schemas?

1192


The count() function always returns a int value type what should you do if you need to count rows from a query which you know will return a value that is too large for an int value type?

1051


Explain about xml databases?

1117


Explain the rollup operator?

1143


How to use online Backups?

2260


Pgm A calls Pgm B and pgm B uses cursor, when pgm B is called second time, the program is abending saying the cursor is opened? Why?

2471


What is normalization? Explain different levels of normalization?

63419


What is an application role and explain a scenario when you would use one?

1059


How long can an error message be in raiseerror function?

1045