** 1.连接考察点:**
- inner join: 结果保留匹配的
- left join: 结果为左边全部的
- right join: 结果为右边全部的
- full join: 结果为左右所有的
** 2.查询薪水第二高,空可以返回**
select ifnull(
( SELECT distinct
Salary from Employee
order by Salary desc limit 1,1 ),null)
as SecondHighestSalary`
** 3.查找重复的电子邮箱**
select distinct a.Email from Person a ,Person b where a.Email = b.Email and a.id!=b.id
#或
select Email from Person group by Email having count(*)>1