176. Second Highest Salary(SQL)
# Easy
distinct 不要忘了,仔细读题
limit 表示只取出1个
offset 表示偏移1位,到top2了,这时候取出1个正好是第二大的
desc 表示降序排列,asc 表示升序排列
重命名的语法也要注意,select x as y from tableName
Last updated
Was this helpful?
# Easy
distinct 不要忘了,仔细读题
limit 表示只取出1个
offset 表示偏移1位,到top2了,这时候取出1个正好是第二大的
desc 表示降序排列,asc 表示升序排列
重命名的语法也要注意,select x as y from tableName
Last updated
Was this helpful?