
--
-- TBL_SIEVESDETAIL_MASTER
--
  CREATE TABLE "TBL_SIEVESDETAIL_MASTER" 
   (	"SIEVESDETAILID" NUMBER GENERATED ALWAYS AS IDENTITY
 MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE NOT NULL ENABLE,
	"SIEVESID" NUMBER NOT NULL ENABLE,
	"SIEVE_PCS" NUMBER(12,4) NOT NULL ENABLE,
	"SIEVE_CTS" NUMBER(12,4) NOT NULL ENABLE,
	"SIEVE_SIZE" NUMBER(12,4) NOT NULL ENABLE,
	"SIEVE_PER" NUMBER(12,4) NOT NULL ENABLE,
	"IS_ACTIVE" CHAR(1) NOT NULL ENABLE,
	"IS_DELETE" CHAR(1) NOT NULL ENABLE,
	"COMPANYID" NUMBER NOT NULL ENABLE,
	"ADDED_BY" NUMBER NOT NULL ENABLE,
	"ADDED_DATE" DATE DEFAULT SYSDATE NOT NULL ENABLE,
	"ADDED_TIME" DATE DEFAULT SYSDATE,
	"MODIFIED_BY" NUMBER,
	"MODIFIED_DATE" DATE DEFAULT SYSDATE,
	"ADATE" NVARCHAR2(25),
	"ATIME" NVARCHAR2(25),
	"ENTERBY" NVARCHAR2(50),
	"CHANGEDBY" NVARCHAR2(50),
	"SIEVEIDFROMMASTER" NUMBER NOT NULL ENABLE
   );
--
-- PK_SIEVESDETAILID
--
ALTER TABLE "TBL_SIEVESDETAIL_MASTER" ADD CONSTRAINT "PK_SIEVESDETAILID" PRIMARY KEY ("SIEVESDETAILID") ENABLE;

--
-- FK_ADDEDBY_SIEVESDETAIL
--
ALTER TABLE "TBL_SIEVESDETAIL_MASTER" ADD CONSTRAINT "FK_ADDEDBY_SIEVESDETAIL" FOREIGN KEY ("ADDED_BY") REFERENCES "TBL_USER"("USERID") ENABLE;

--
-- FK_MODIFIEDBY_SIEVESDETAIL
--
ALTER TABLE "TBL_SIEVESDETAIL_MASTER" ADD CONSTRAINT "FK_MODIFIEDBY_SIEVESDETAIL" FOREIGN KEY ("MODIFIED_BY") REFERENCES "TBL_USER"("USERID") ENABLE;

--
-- FK_SIEVEIDFROMMASTER
--
ALTER TABLE "TBL_SIEVESDETAIL_MASTER" ADD CONSTRAINT "FK_SIEVEIDFROMMASTER" FOREIGN KEY ("SIEVEIDFROMMASTER") REFERENCES "TBL_DIAMOND_SIEVES"("SIEVEID") ENABLE;

--
-- FK_SIEVES_SIEVESDETAIL
--
ALTER TABLE "TBL_SIEVESDETAIL_MASTER" ADD CONSTRAINT "FK_SIEVES_SIEVESDETAIL" FOREIGN KEY ("SIEVESID") REFERENCES "TBL_SIEVES_MASTER"("SIEVESID") ENABLE;

