CREATE SEQUENCE SEQ_PRODSUPPLYTEK INCREMENT BY 1 MINVALUE 1
/

CREATE TABLE PRODSUPPLYTEK
(
    IDPRODSUPPLYTEK NUMBER NOT NULL,
    DSDESCRICAO     CLOB,
    CDPRODUTO        VARCHAR2(10),
    DSPATHFOTO      VARCHAR2(500),
    IDEXISTEFOTO    VARCHAR2(1) DEFAULT 'N' NOT NULL,
      CONSTRAINT CKC_EXISTEFOTO_PRODSUPTEK CHECK (IDEXISTEFOTO IN ('S','N')), 
    IDEXISTEDESC    VARCHAR2(1) DEFAULT 'N' NOT NULL,
      CONSTRAINT CKC_EXISTEDESC_PRODSUPTEK CHECK (IDEXISTEDESC IN ('S','N')), 
    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_IDPRODSUPPLYTEK CHECK (IDATIVO IN ('S','N')),
		CONSTRAINT PK_PRODSUPPLYTEK PRIMARY KEY(IDPRODSUPPLYTEK)
)
/