Home > Database > Mysql Tutorial > mysql中关于外键约束的小问题

mysql中关于外键约束的小问题

WBOY
Release: 2016-06-06 09:32:48
Original
1038 people have browsed it

mysql

我想问,主表被references后不允许先删除记录,又说从表指定on delete cascade后删除主表记录时从表记录随之删除,你说这不矛盾吗?到底让不让删除?
例如下面这张图,student_table参考teacher_table,我却删不掉主表teacher_table图片说明

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template