我有以下表格:
CREATE TABLE publishers
(
name VARCHAR(50) NOT NULL,
status TINYINT DEFAULT 1 NOT NULL,
CONSTRAINT publishers_pk PRIMARY KEY (name)
);
CREATE TABLE titles
(
id INT NOT NULL AUTO_INCREMENT,
publisher VARCHAR(50),
title VARCHAR(50) NOT NULL,
status ENUM('active', 'announced', 'inactive'),
discount TINYINT NOT NULL,
CONSTRAINT title_pk PRIMARY KEY (id),
CONSTRAINT title_fk FOREIGN KEY (publisher)
REFERENCES publishers (name)
ON DELETE SET NULL
ON UPDATE CASCADE
);
当我更改发布者中的“名称”时,它不会更改标题表中的“发布者”。为什么这种行为会这样运作?