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;

  • 相关阅读:
    python爬取代理IP地址
    神经网络训练的过程
    机器学习中用到的数学概念
    Navicat连接Mysql错误代码1251
    mysql安装
    mysql运行找不到MSVCP140.dll
    tomcat 日志乱码
    扁平化 Flat
    常见的WEB安全及防护
    CentOS ceph 集群搭建(单节点)
  • 原文地址:https://www.cnblogs.com/azhulei-1/p/4913309.html
Copyright © 2011-2022 走看看