学生选课数据库SQL语句练习题——成绩表

表(三)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 '成绩';

 

posted @ 2016-06-07 16:14  jakermk  阅读(583)  评论(0编辑  收藏  举报