alter table jobs
add constraint FK_JOBS_REFERENCE_COMPANYK foreign key (userid)
references companykk (id)
on update restrict
on delete restrict
REFERENCES 子句只支持如下 ON Delete 和 ON Update 子句:
[ ON Delete { CASCADE | NO ACTION } ]
[ ON Update { CASCADE | NO ACTION } ]
把
on update restrict
on delete restrict
改成
on update CASCADE
on delete CASCADE
add constraint FK_JOBS_REFERENCE_COMPANYK foreign key (userid)
references companykk (id)
on update restrict
on delete restrict
REFERENCES 子句只支持如下 ON Delete 和 ON Update 子句:
[ ON Delete { CASCADE | NO ACTION } ]
[ ON Update { CASCADE | NO ACTION } ]
把
on update restrict
on delete restrict
改成
on update CASCADE
on delete CASCADE