“SQL 学生 课程 分数 2”的版本间的差异
跳到导航
跳到搜索
Jihongchang(讨论 | 贡献) |
Jihongchang(讨论 | 贡献) |
||
| 第17行: | 第17行: | ||
score integer not null | score integer not null | ||
); | ); | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | === 准备数据 === | ||
| + | <syntaxhighlight lang="sql"> | ||
| + | 1 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
2024年7月9日 (二) 04:57的版本
建表
create table course (
id integer primary key,
name text not null
);
create table student (
id integer primary key,
name text not null
);
create table score (
id integer primary key,
course_id integer not null,
student_id integer not null,
score integer not null
);
准备数据
1