English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

5 answers

SELECT salary FROM tblSalary a WHERE (SELECT COUNT(b.salary) FROM tblSalary b WHERE b.salary>a.salary)=1

Or, "Select the salary where the number of salaries greater than that salary is 1"

2007-03-15 17:43:56 · answer #1 · answered by Rex M 6 · 0 0

SELECT salary FROM (SELECT salary FROM table ORDER BY salary DESC LIMIT 2) ORDER BY salary LIMIT 1;

2007-03-16 01:24:23 · answer #2 · answered by generic 2 · 0 0

SELECT TOP 1 salary
FROM (SELECT TOP 2 salary
FROM sal
ORDER BY salary DESC)
ORDER BY salary

2007-03-16 03:15:30 · answer #3 · answered by vaibhav s 1 · 0 0

select max(Salary) from [tablename] where Salary<(select max(Salary) from [tablename])

2007-03-16 00:57:15 · answer #4 · answered by bonny_bros 1 · 0 0

Please re-word question.

2007-03-16 00:43:37 · answer #5 · answered by K.Heat 3 · 0 1

fedest.com, questions and answers