zoukankan      html  css  js  c++  java
  • Oracle数据库

     1 -- Create table
     2 create table T_STUDENT
     3 (
     4   sno       VARCHAR2(3) not null,
     5   sname     VARCHAR2(8) not null,
     6   ssex      VARCHAR2(2) not null,
     7   sbirthday DATE,
     8   class     VARCHAR2(5)
     9 )
    10 tablespace USERS
    11   pctfree 10
    12   initrans 1
    13   maxtrans 255
    14   storage
    15   (
    16     initial 64K
    17     next 1M
    18     minextents 1
    19     maxextents unlimited
    20   );
    21 -- Add comments to the table 
    22 comment on table T_STUDENT
    23   is '学生表';
    24 -- Add comments to the columns 
    25 comment on column T_STUDENT.sno
    26   is '学号';
    27 comment on column T_STUDENT.sname
    28   is '学生姓名';
    29 comment on column T_STUDENT.ssex
    30   is '学生性别';
    31 comment on column T_STUDENT.sbirthday
    32   is '学生出生年月';
    33 comment on column T_STUDENT.class
    34   is '学生所在班级';

     1 -- Create table
     2 create table T_COURSE
     3 (
     4   cno   VARCHAR2(5) not null,
     5   cname VARCHAR2(10) not null,
     6   tno   VARCHAR2(3) not null
     7 )
     8 tablespace USERS
     9   pctfree 10
    10   initrans 1
    11   maxtrans 255
    12   storage
    13   (
    14     initial 64K
    15     next 1M
    16     minextents 1
    17     maxextents unlimited
    18   );
    19 -- Add comments to the table 
    20 comment on table T_COURSE
    21   is '课程表';
    22 -- Add comments to the columns 
    23 comment on column T_COURSE.cno
    24   is '课程号(主键)';
    25 comment on column T_COURSE.cname
    26   is '课程名称';
    27 comment on column T_COURSE.tno
    28   is '教工编号(外键)';

     1 -- Create table
     2 create table T_SCORE
     3 (
     4   sno    VARCHAR2(3) not null,
     5   cno    VARCHAR2(5) not null,
     6   degree NUMBER(4,1)
     7 )
     8 tablespace USERS
     9   pctfree 10
    10   initrans 1
    11   maxtrans 255
    12   storage
    13   (
    14     initial 64K
    15     next 1M
    16     minextents 1
    17     maxextents unlimited
    18   );
    19 -- Add comments to the table 
    20 comment on table T_SCORE
    21   is '成绩表';
    22 -- Add comments to the columns 
    23 comment on column T_SCORE.sno
    24   is '学号(外键)';
    25 comment on column T_SCORE.cno
    26   is '课程号(外键)';
    27 comment on column T_SCORE.degree
    28   is '成绩';

     1 -- Create table
     2 create table T_TEACHER
     3 (
     4   tno       VARCHAR2(3) not null,
     5   tname     VARCHAR2(4) not null,
     6   tsex      VARCHAR2(2) not null,
     7   tbirthday DATE,
     8   prof      VARCHAR2(6),
     9   depart    VARCHAR2(10) not null
    10 )
    11 tablespace USERS
    12   pctfree 10
    13   initrans 1
    14   maxtrans 255
    15   storage
    16   (
    17     initial 64K
    18     next 1M
    19     minextents 1
    20     maxextents unlimited
    21   );
    22 -- Add comments to the table 
    23 comment on table T_TEACHER
    24   is '教师表';
    25 -- Add comments to the columns 
    26 comment on column T_TEACHER.tno
    27   is '教工编号(主键)';
    28 comment on column T_TEACHER.tname
    29   is '教工姓名';
    30 comment on column T_TEACHER.tsex
    31   is '教工性别';
    32 comment on column T_TEACHER.tbirthday
    33   is '教工出生年月日';
    34 comment on column T_TEACHER.prof
    35   is '职称';
    36 comment on column T_TEACHER.depart
    37   is '教工所在部门';

  • 相关阅读:
    matplotlib
    python 面向对象(进阶篇)转载武沛齐
    Python 面向对象(初级篇)
    jupter nootbok 快捷键、NumPy模块、Pandas模块初识
    爬虫系列之mongodb
    python迟邦定
    爬虫之selenium模块
    爬虫数据解析的三方式
    爬虫之requests模块
    315题
  • 原文地址:https://www.cnblogs.com/yg6405816/p/5568132.html
Copyright © 2011-2022 走看看