CREATE TABLE BLOQEXPEDICAO
(
CDFILIAL         VARCHAR2(4)   NOT NULL,
NRPEDIDO         VARCHAR2(10)  NOT NULL,
NRITEMPED        VARCHAR2(10)  NOT NULL,
DSDESCRICAO      VARCHAR2(100) NOT NULL,
DSOPERADOR       VARCHAR2(100) NOT NULL,
NRORG 			        NUMBER 			    DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
IDATIVO 			      VARCHAR2(1) 	 DEFAULT 'S' NOT NULL
   CONSTRAINT CKC_IDATIVO_BLOQEXPEDICAO CHECK (IDATIVO IN ('S','N')),
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_BLOQEXPEDICAO PRIMARY KEY (CDFILIAL, NRPEDIDO, NRITEMPED)
)
/ 