人形犬奴改造手术小说:sql外连接

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/14 11:59:08
输出结果为
name city name city
-------- ---------- -------- ----------
NULL NULL george NULL
NULL NULL james dallas
nancy NULL NULL NULL
mary boston henry boston
mary boston john boston
betty chicago sam chicago
susan chicago sam chicago
anne denver NULL NULL

我在sql里面不能用*=*做外连接。
只能用
select *
from girls,boys
where girls.city =* boys.city
union
select *
from girls,boys
where girls.city *= boys.city
order by 2
来实现。
请问有没有更简单的方法实现两个表的连接,使所有null和不匹配的值全部列出,而没有重复。
select *
from girls,boys
这个就不要了

select distinct * from girls full join boys on girls.city = boys.city