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;

  • 相关阅读:
    使用Koa搭建一个mock服务器
    d3 使用记录: 树形图
    转载: 矩阵的运算及运算规则
    d3 使用记录: 插值
    d3 使用记录: Selection
    转载: javascript 模块化历程
    Git 常用操作
    贝塞尔曲线_初探
    css 基础-
    Freemarker模板语法
  • 原文地址:https://www.cnblogs.com/azhulei-1/p/4913309.html
Copyright © 2011-2022 走看看