外键约束

alter table w_temp_d add constraint w_temp_fk foreign key (ID) references w_temp_h

alter table w_temp_d nocheck constraint w_temp_fk
alter table w_temp_d check constraint w_temp_fk

select * from w_temp_h h leftouter join w_temp_d d on( h.ID=d.ID)
select * from w_temp_h h right outer join w_temp_d d on( h.ID=d.ID)
select * from w_temp_h h full outer join w_temp_d d on( h.ID=d.ID)

你可能感兴趣的:(约束)