2014年2月17日 星期一
Oracle DB Production Planning Z_ITEMOPERATION
ALTER TABLE C##AD.Z_ITEMOPERATION DROP PRIMARY KEY CASCADE;
DROP TABLE C##AD.Z_ITEMOPERATION CASCADE CONSTRAINTS;
CREATE TABLE C##AD.Z_ITEMOPERATION
(
Z_ITEM NUMBER(10) NOT NULL,
Z_ITEMOPERATION_ID NUMBER(10) NOT NULL,
Z_ITEMOPERATION_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,
Z_RESOURCE_ID NUMBER(10) NOT NULL,
Z_OPERATION_ID NUMBER(10) NOT NULL,
STRATDATE DATE,
COMPLETEDATE DATE,
USAGE NUMBER(10) NOT NULL,
Z_UOM_ID NUMBER(10) NOT NULL,
MIN_Transfer_Qty NUMBER(10)
)
/
CREATE UNIQUE INDEX C##AD.Z_ITEMOPERATION_UU_IDX ON C##AD.Z_ITEMOPERATION(Z_ITEMOPERATION_UU);
/
CREATE UNIQUE INDEX C##AD.Z_ITEMOPERATION_KEY ON C##AD.Z_ITEMOPERATION(Z_ITEMOPERATION_ID);
/
ALTER TABLE C##AD.Z_ITEMOPERATION ADD
(CHECK (IsActive IN ('Y','N')) ENABLE VALIDATE,
CONSTRAINT Z_ITEMOPERATION_KEY PRIMARY KEY (Z_ITEMOPERATION_ID) USING INDEX C##AD.Z_ITEMOPERATION_KEY ENABLE VALIDATE);
/
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言