From 72ad4426fe51b773d3f02a2b9c1ec175088fee01 Mon Sep 17 00:00:00 2001 From: smallkun Date: Wed, 19 Mar 2025 07:59:01 +0800 Subject: [PATCH] Auto commit --- 2207/MySQL数据库操作综合练习题答案.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/2207/MySQL数据库操作综合练习题答案.md b/2207/MySQL数据库操作综合练习题答案.md index f3306bb..4a69594 100644 --- a/2207/MySQL数据库操作综合练习题答案.md +++ b/2207/MySQL数据库操作综合练习题答案.md @@ -449,6 +449,30 @@ CREATE TABLE SG ( FOREIGN KEY (Sn0) REFERENCES Student(Sn0), -- 外键,引用 Student 表 FOREIGN KEY (Cn0) REFERENCES Course(Cn0) -- 外键,引用 Course 表 ); + +INSERT INTO Student (Sno, Sname, Ssex, Sage, Sdept, Scome) VALUES +('05001', '张三', '男', 20, '计算机系', '2021-09-01'), +('05002', '李四', '女', 21, '数学系', '2021-09-01'), +('05003', '王五', '男', 22, '计算机系', '2021-09-01'), +('05004', '李洋', '男', 19, '物理系', '2021-09-01'), +('05019', '赵六', '女', 20, '计算机系', '2021-09-01'); + +INSERT INTO Course (Cno, Cname, Cpno, Ccredit) VALUES +('1', '数据库', NULL, 4), +('2', '数学', NULL, 3), +('3', '物理', NULL, 3), +('4', '操作系统', '1', 4); + +INSERT INTO SG (Sno, Cno, Grade) VALUES +('05001', '1', 85), +('05001', '2', 90), +('05002', '1', 78), +('05002', '3', 88), +('05003', '1', 92), +('05003', '4', 76), +('05004', '3', 95), +('05019', '1', 80), +('05019', '4', 85); ``` ---