CREATE TABLE MT_DESIGN_ESTRUTURA_TASK
 (
    NR_MT_DESIGN_ESTRUTURA_TASK  		NUMBER NOT NULL,
    MT_DESIGN_ESTRUTURA_ID  			NUMBER NOT NULL,
    TASK 								NUMBER NOT NULL,
    NRORG 								NUMBER DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
    DTINCLUSAO 							DATE NULL,
    DTULTATU 							DATE NULL,
    NRORGINCLUSAO 						NUMBER DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NULL,
    CDOPERINCLUSAO 						VARCHAR2(12) DEFAULT '1' NULL,
    NRORGULTATU 						NUMBER DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NULL,
    CDOPERULTATU 						VARCHAR2(12) DEFAULT '1',
		CONSTRAINT PK_MT_DESIGN_ESTRUTURA_TASK PRIMARY KEY(NR_MT_DESIGN_ESTRUTURA_TASK)
)
/

ALTER TABLE MT_DESIGN_ESTRUTURA_TASK ADD
    CONSTRAINT FK_MT_DES_EST_TASK_MT_DES_EST FOREIGN KEY (MT_DESIGN_ESTRUTURA_ID)
		REFERENCES MT_DESIGN_ESTRUTURA (ID)
/ 