Auto commit

This commit is contained in:
smallkun 2025-03-19 07:59:01 +08:00
parent df4fea3437
commit 72ad4426fe

View File

@ -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);
```
---