• 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);

  • 相关阅读:
    犯错记录(一)
    BullseyeCoverage:代码覆盖率。
    测试工具:insure++
    C++ 常见容器
    linux修改rm指令执行(数据安全)
    C++细节系列(零):零散记录
    vim中使用gdb。
    vim自动补全文章搜集
    排序算法的个人心得体会。
    面向对象的三个特征。
  • 原文地址:https://www.cnblogs.com/pan11jing/p/1513110.html
Copyright © 2020-2023  润新知