--查询相同数据
select [字段名]或[*]
from [表名称1]
intersect
from [表名称2]
--查询不同数据
except
select [字段名2]或[*]
from [表名称]