下面是 MySQL 语言中设计课程章节表和课程小节表的示例:
课程章节表:
CREATE TABLE course_chapters (
id INT PRIMARY KEY AUTO_INCREMENT,
course_id INT NOT NULL,
chapter_name VARCHAR(255) NOT NULL,
FOREIGN KEY (course_id) REFERENCES courses(id)
);
下面是 MySQL 语言中设计课程章节表和课程小节表的示例:
课程章节表:
CREATE TABLE course_chapters (
id INT PRIMARY KEY AUTO_INCREMENT,
course_id INT NOT NULL,
chapter_name VARCHAR(255) NOT NULL,
FOREIGN KEY (course_id) REFERENCES courses(id)
);