CREATE TABLE ITEMOPERACIONAL
 (
   NRITEMOPERACIONAL NUMBER(10) 	 NOT NULL, 
   IDTIPOORCAOP 	 VARCHAR2(30) 	 NOT NULL, 
   IDCHECK 			 VARCHAR2(1) 	 DEFAULT 'S' 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 PK_ITEMOPERACIONAL PRIMARY KEY(NRITEMOPERACIONAL)
)
/

ALTER TABLE ITEMOPERACIONAL ADD CONSTRAINT CKC_IDCHECK_ITEMOPERACIONAL CHECK (IDCHECK IN ('S','N'))
/

ALTER TABLE ITEMOPERACIONAL ADD CONSTRAINT CKC_IDATIVO_ITEMOPERACIONAL CHECK (IDATIVO IN ('S','N'))
/