这是我的代码,但registry_num
不明确的错误。此外,当我摆脱registry_num时,结果只返回我的违规者表中的数据。
select first_name, last_name, address1,
address2, city, state,
start_date, end_date, registry_num
from offenders left outer join addresses
on address1 = 'disney' or 'cruise';
答案 0 :(得分:1)
这主要是猜测,但根据你得到的错误,(更多)正确的版本可能是:
Select o.registry_num
, o.first_name
, o.last_name
, a.address1
, a.address2
, a.city
, a.state
, o.start_date
, o.end_date
From offenders o
Left join addresses a
On a.registry_num = o.registry_num
Where a.address1 in ( 'disney', 'cruise')
;