zoukankan      html  css  js  c++  java
  • oracle创建临时表

    -- oracle临时表,先创建,后使用
    create global temporary table TMP_CUSTOMERINFO
    (
      BRANCHFLAG      CHAR(3) not null,
      CUSTOMERID      VARCHAR2(11) not null,
      CUSTOMERNO      VARCHAR2(20),
      CUSTOMERNAME    VARCHAR2(200),
      GROUPCUSTOMERNO VARCHAR2(20),
      CUSTOMERTYPE    CHAR(1),
      DENGJI          CHAR(3)
    )
    on commit delete rows          --在事务提交后数据就已经清除了.
    --or
    --on commit preserve rows;   --在会话中止时或者导常退出时数据都会被清除掉.

    -- Add comments to the columns
    comment on column TMP_CUSTOMERINFO.BRANCHFLAG
      is '公司标识';
    comment on column TMP_CUSTOMERINFO.CUSTOMERID
      is '客户id';
    comment on column TMP_CUSTOMERINFO.CUSTOMERNO
      is '客户编号';
    comment on column TMP_CUSTOMERINFO.CUSTOMERNAME
      is '客户名称';
    comment on column TMP_CUSTOMERINFO.GROUPCUSTOMERNO
      is '客户统一编号';
    comment on column TMP_CUSTOMERINFO.CUSTOMERTYPE
      is '客户类别';
    comment on column TMP_CUSTOMERINFO.DENGJI
      is '客户等级';
    -- Create/Recreate primary, unique and foreign key constraints
    alter table TMP_CUSTOMERINFO
      add primary key (BRANCHFLAG, CUSTOMERID);

  • 相关阅读:
    linux网卡eth1如何修改为eth0
    rpm方式安装MySQL5.1.73
    quartz demo01
    chrome 搜索 jsonView
    判断是否十六进制格式字符串
    ip and port check 正则
    hadoop 遇到java.net.ConnectException: to 0.0.0.0:10020 failed on connection
    hadoop2.4.1 伪分布
    R 包
    使用pt-heartbeat检测主从复制延迟
  • 原文地址:https://www.cnblogs.com/pan11jing/p/1513110.html
Copyright © 2011-2022 走看看