ALTER TABLE C##AD.Z_RESOURCETYPE DROP PRIMARY KEY CASCADE;
DROP TABLE C##AD.Z_RESOURCETYPE CASCADE CONSTRAINTS;
CREATE TABLE C##AD.Z_RESOURCETYPE
(
Z_RESOURCETYPE_ID NUMBER(10) NOT NULL,
Z_RESOURCETYPE_UU NVARCHAR2(36) DEFAULT NULL,
AD_CLIENT_ID NUMBER(10) NOT NULL,
AD_ORG_ID NUMBER(10) NOT NULL,
ISACTIVE CHAR(1 BYTE) NOT NULL,
CREATED DATE NOT NULL,
CREATEDBY NUMBER(10) NOT NULL,
UPDATED DATE NOT NULL,
UPDATEDBY NUMBER(10) NOT NULL,
NAME NVARCHAR2(120) NOT NULL,
VALUE NVARCHAR2(40) NOT NULL,
DESCRIPTION NVARCHAR2(255) DEFAULT NULL
);
/
CREATE UNIQUE INDEX C##AD.Z_RESOURCETYPE_UU_IDX ON C##AD.Z_RESOURCETYPE(Z_RESOURCETYPE_UU);
/
CREATE UNIQUE INDEX C##AD.Z_RESOURCETYPE_KEY ON C##AD.Z_RESOURCETYPE(Z_RESOURCETYPE_ID);
/
ALTER TABLE C##AD.Z_RESOURCETYPE ADD
(CHECK (IsActive IN ('Y','N')) ENABLE VALIDATE,
CONSTRAINT Z_RESOURCETYPE_KEY PRIMARY KEY (Z_RESOURCETYPE_ID) USING INDEX C##AD.Z_RESOURCETYPE_KEY ENABLE VALIDATE);
/
沒有留言:
張貼留言