CREATE TABLE MT_DESIGN_ESTRUTURA_CLIENT(
    ID NUMBER NOT NULL,
    MT_DESIGN_ESTRUTURA_CLIENT_ID     NUMBER          NOT NULL,
    CDCLIENTE         VARCHAR2(21)    NOT NULL,
    NRORG             NUMBER          DEFAULT SYS_CONTEXT('NRORG_CTX','NRORG')   NOT NULL,
    IDATIVO           VARCHAR2(1)     DEFAULT 'S'   NOT NULL,
    DTINCLUSAO        DATE            DEFAULT SYSDATE,
    DTULTATU          DATE            DEFAULT SYSDATE,
    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 CKC_IDATIVO_MT_DESIGN_EST_CLI CHECK (IDATIVO IN ('S','N')),
        CONSTRAINT PK_MT_DESIGN_ESTRUTURA_CLIENT PRIMARY KEY (ID),
        CONSTRAINT FK_MT_DESIGN_ESTRUT_CLI_EST FOREIGN KEY (MT_DESIGN_ESTRUTURA_CLIENT_ID) REFERENCES MT_DESIGN_ESTRUTURA (ID),
        CONSTRAINT FK_MT_DESIGN_ESTRUT_CLI_CLI FOREIGN KEY (CDCLIENTE) REFERENCES CLIENTE (CDCLIENTE)
)
/