表(三)Score(成绩表)
属性名 | 数据类型 | 可否为空 | 含 义 |
Sno | Varchar2(3) | 否 | 学号(外键) |
Cno | Varchar2(5) | 否 | 课程号(外键) |
Degree | Number(4,1) | 可 | 成绩 |
主键:Sno+ Cno |
-- Create table
create table SCORE
(
sno VARCHAR2(3) not null,
cno VARCHAR2(5) not null,
degree NUMBER(4,1)
)
tablespace TEST
pctfree 10
initrans 1
maxtrans 255;
-- Add comments to the table
comment on table SCORE
is '成绩表';
-- Add comments to the columns
comment on column SCORE.sno
is '学号';
comment on column SCORE.cno
is '课程号';
comment on column SCORE.degree
is '成绩';