日期:2014-05-16 浏览次数:20560 次
create table OrderMaster ( OrderID number primary key, UserName varchar2(20), OrderDate date ) create table OrderDetail ( OrderID number, PName varchar2(20), Count number, constraint FK_OrderID foreign key(OrderID) references OrderMaster(OrderID) )
create table OrderDetail ( OrderID number, PName varchar2(20), Count number ) alter table OrderDetail add constraint FK_OrderID foreign key (OrderID) references OrderMaster(OrderID)