摘要: select (select distinct Salary from Employee order by Salary desc limit 1,1) as SecondHighestSalary 注意加distinct,如果不加这个关键字,无法通过测试。 阅读全文
posted @ 2020-07-22 20:10 Sempron2800+ 阅读(101) 评论(0) 推荐(0) 编辑
摘要: leetcode数据库的题目,组合两个表,使用left join查询。 select p.FirstName,p.LastName,a.City,a.State from Person p left join Address a on p.PersonId = a.PersonId; 阅读全文
posted @ 2020-07-22 17:15 Sempron2800+ 阅读(118) 评论(0) 推荐(0) 编辑