例如,我们有两个表创建两个表之间的关系,并建立一个外键
creators (
creatorid int not null,
title varchar(100) not null,
primary key(creatorid)
);
authors (
creatorid int not null,
titleid int not null,
primary key (creatorid, titleid)
);
好,请问如何使关系?我认为creatorid必须与第二个表格中的creatorid关联,但我不知道如何制作它。
一个很好的答案应该显示如何做到这一点,不只是李nk给文档。 – Barmar
一个很好的问题应该已经证明了最小的文档搜索来完成任务。 –