• Oracle 表脚本备忘


    DROP TABLE "TASKITEM";

    CREATE TABLE "TASKITEM"
    ("TASKITEMID" NUMBER NOT NULL ENABLE,
    "MODIFYCOUNT" NUMBER DEFAULT 0,
    "SYSTEMGROUPID" NUMBER DEFAULT 0 NOT NULL ENABLE,
    "DESCRIPTION" VARCHAR2(400),
    "MAKERUSERID" NUMBER DEFAULT 0 NOT NULL ENABLE,
    "PLANENDDATE" DATE,
    "ACTUALENDDATE" DATE,
    "MADETIME" DATE,
    "REMINDTIME" DATE,
    "DROPTIME" DATE,
    "STATUS" NUMBER DEFAULT 1,
    "ANNOTATION" VARCHAR2(400),
    "TASKACCEPTANCETYPEID" NUMBER DEFAULT 0 NOT NULL ENABLE,
    "ISIMPORTANT" NUMBER DEFAULT 0 NOT NULL ENABLE,
    "ASPID" NUMBER DEFAULT 0 NOT NULL ENABLE,
    "TASKLEADER" NUMBER DEFAULT 0,
    "PERSONALAPPROVE" NUMBER DEFAULT 0,
    "DEPARTMENTAPPROVE" NUMBER DEFAULT 0,
    "COMPANYAPPROVE" NUMBER DEFAULT 0,
    "MODIFIER" NUMBER DEFAULT 0,
    "DELAYDAYS" NUMBER DEFAULT 0,
    "ANNOTATION1" VARCHAR2(400),
    "ANNOTATION2" VARCHAR2(400),
    "ANNOTATION3" VARCHAR2(400),
    "ANNOTATION4" VARCHAR2(400),
    "ANNOTATION5" VARCHAR2(400),
    "VISIBLE" NUMBER DEFAULT 1 NOT NULL ENABLE,
    "ASSISTMANAGERAPPROVE" NUMBER DEFAULT 0 NOT NULL ENABLE,
    "MONTHITEMID" NUMBER DEFAULT 0 NOT NULL ENABLE
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS"
    ;

    --创建序列

    CREATE SEQUENCE "SU_TASKITEM" INCREMENT BY 1 START WITH 1 MAXVALUE 1.0E27
    MINVALUE 1 NOCYCLE CACHE 20 ORDER;

    -- ----------------------------
    --
    创建触发器(主键自增)
    --
    ----------------------------
    CREATE OR REPLACE TRIGGER "TU_TASKITEM" BEFORE INSERT ON "TASKITEM" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW
    BEGIN IF :new.TASKITEMID IS NULL THEN
    SELECT SU_TASKITEM.NEXTVAL INTO :new.TASKITEMID
    FROM dual;
    END IF;
    END;;
    by archie
  • 相关阅读:
    腰颈椎病康复运动治疗
    丹田呼吸简易教程
    丹田呼吸法
    GNU 汇编语言
    openssl命令简介
    AES128 + cbc + pkcs7 编码C语言实现
    一些linux下的性能监测工具
    git 基本使用教程
    【译】UI设计基础(UI Design Basics)--导航(Navigation)(六)
    【译】UI设计基础(UI Design Basics)--启动与停止(Starting and Stopping)(五)
  • 原文地址:https://www.cnblogs.com/archie2010/p/2229101.html
Copyright © 2020-2023  润新知