找出由大到小第N個項目,蠻有創意的SQL寫法
http://duckfly-tw.blogspot.tw/2017/03/n.html 找出由大到小第N個項目 找出由大到小第N個項目,蠻有創意的SQL寫法 1 2 3 4 5 6 7 SELECT * FROM Employee Emp1 WHERE (N-1) = ( SELECT COUNT ( DISTINCT (Emp2.Salary)) FROM Employee Emp2 WHERE Emp2.Salary > Emp1.Salary )