alter table tableB add constraint b_PK primary key(date,channel)
2、将B表的组合主键关联到A表的外键组合键中
alter table tableB add constraint tableB_fk foreign key(date,channel) references tableA (date,channel) on DELETE CASCADE
3 delete from tableA where date =? and channel =? 就出发相关记录··~
create table temp(id char(6) not null,
gradeId char(3) not null,
mark tinyint(1),
primary key(id,gradeId)
)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)