--ALTER TABLE C##AD.HIS_Column DROP PRIMARY KEY CASCADE;
--DROP TABLE C##AD.HIS_Column CASCADE CONSTRAINTS;
CREATE TABLE C##AD.HIS_Column
(
HIS_Table_ID NUMBER(10) NOT NULL,
HIS_Column_ID NUMBER(10) NOT NULL,
HIS_Column_UU NVARCHAR2(36) DEFAULT NULL,
AD_CLIENT_ID NUMBER(10) NOT NULL,
AD_ORG_ID NUMBER(10) NOT NULL,
ISACTIVE CHAR(1 BYTE) DEFAULT 'Y' NOT NULL,
CREATED DATE DEFAULT SYSDATE NOT NULL,
CREATEDBY NUMBER(10) NOT NULL,
UPDATED DATE DEFAULT SYSDATE NOT NULL,
UPDATEDBY NUMBER(10) NOT NULL,
NAME NVARCHAR2(60) NOT NULL,
DESCRIPTION NVARCHAR2(255),
HELP NVARCHAR2(2000)
);
CREATE UNIQUE INDEX C##AD.HIS_Column_UU_IDX ON C##AD.HIS_Column(HIS_Column_UU);
CREATE UNIQUE INDEX C##AD.HIS_Column_KEY ON C##AD.HIS_Column(HIS_Column_ID);
ALTER TABLE C##AD.HIS_Column ADD (
CHECK (IsActive in ('Y','N')) ENABLE VALIDATE,
CONSTRAINT HIS_Column_KEY PRIMARY KEY (HIS_Column_ID)
USING INDEX C##AD.HIS_Column_KEY ENABLE VALIDATE);
沒有留言:
張貼留言