[Leetcodeシリーズ] [SQL] [単純] 2番目に高い給与

トピック:

トピックリンク:  https://leetcode-cn.com/problems/second-highest-salary/

 

問題解決のアイデア:

キーワード制限を使用してオフセットメインのテストサイト

IFNULL裁判官を使用する必要があるので、ノー2番目に高い給与があるかもしれない、という注意

 

SQL:

select (select distinct Salary from Employee order by salary desc limit 1 offset 1) as SecondHighestSalary

 

公開された100元の記事 ウォンの賞賛4 ビュー1453

おすすめ

転載: blog.csdn.net/songyuwen0808/article/details/105423753