sql语句中constraint是什么意思啊
sql语句中constraint是什么意思啊
create table 成绩
(
学号 char(11) references 学员信息(学号) not null,
课程 int references 课程(编号) not null,
考次 int constraint PK_成绩 primary key(学号,课程,考次) not null,
成绩 decimal(5,2)default(0) not null
)
这是一个建表的SQL语句
constraint PK_成绩 primary key(学号,课程,考次)这句的意义
decimal的意思,括号里的(5,2)又是什么?