zoukankan      html  css  js  c++  java
  • 表的新建

    -- Create table
    create table T_HQ_JNGF
    (
    mingc VARCHAR2(100) not null,
    nianx DATE,
    shengcrq DATE,
    pinz CHAR(1),
    xingh NUMBER not null,
    baozq DATE
    )
    tablespace TEST
    pctfree 10
    initrans 1
    maxtrans 255
    storage
    (
    initial 64K
    minextents 1
    maxextents unlimited
    );


    -- Add comments to the columns
    comment on column T_HQ_JNGF.mingc
    is '名称';
    comment on column T_HQ_JNGF.nianx
    is '年限';
    comment on column T_HQ_JNGF.shengcrq
    is '生产日期';
    comment on column T_HQ_JNGF.pinz
    is '品种 1:红酒 2:白酒';
    comment on column T_HQ_JNGF.xingh
    is '型号';
    comment on column T_HQ_JNGF.baozq
    is '保质期';
    -- Create/Recreate primary, unique and foreign key constraints
    alter table T_HQ_JNGF
    add constraint XINGH primary key (XINGH)
    using index
    tablespace TEST
    pctfree 10
    initrans 2
    maxtrans 255
    storage
    (
    initial 64K
    minextents 1
    maxextents unlimited
    );


    -- Create/Recreate check constraints
    alter table T_HQ_JNGF
    add constraint CHECK_NIANX
    check (nianx > shengcrq and nianx < baozq);
    -- Create sequence
    create sequence XINGH
    minvalue 1
    maxvalue 99999999
    start with 100
    increment by 1
    cache 100;

  • 相关阅读:
    web----DNS解析
    iToken----开发前准备
    web----计算机网络通讯
    SpringCloud----基础
    微服务----理解
    微服务----docker-compose.yml属性详解
    微服务----一次构建,到处运行
    Linux----安装gcc
    微服务----Registry
    Linux----常用命令
  • 原文地址:https://www.cnblogs.com/azhulei-1/p/4913309.html
Copyright © 2011-2022 走看看