how 2 find out nth salary.plz write sql qurires

Answer Posted / shankar

Hi...
here is the query to find out the n'th maximum salary

note: 1.'emp' is Table name & 'sal' is column name.
2.'distinct' is used for finding the unique value
3.'count' is for counting the values.

Query:
------

SELECT * from emp
where sal = (SELECT distinct(sal) from emp x
where &n = (SELECT count(distinct(sal)) from
emp where sal >= x.sal));

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define cause effect graphing?

678


where can i learn domain knowledge? how cab i gain domain knowledge? what types of Questions can be asked in domain(BFSI)? PLZ REPLY ME

1460


Is there any procedure of web-site development in manual testing. If yes what are factors we should test?

1854


What are tools of performance testing?

701


What is your Approach when you find 10 Sev-1 bugs in 50 test cases?

2059






could anyone explain application testing in sequence order i don't have any experience in that

1493


1.Tell me negative test cases for notepad 2.Tell me the factors for for writing severity based test cases

5524


What are microsoft 6 rules?

762


What is severity and priority of bug? Give some example.

652


. Is any graph is used for code coverage analysis?

2112


Describe Testing Decomposition?

701


What is unit level testing?

642


diff b/w desktop based testing & web application testing

1569


What is the negative testing and example

980


IN SQL SERVER 2005, With out using Query, hw can u break down USER NAME & PASSWORD to enter the software.

1720