--------------------------------------------------------
--  File created - Monday-February-05-2018   
--------------------------------------------------------
--------------------------------------------------------
--  DDL for Table ORDERS
--------------------------------------------------------

  CREATE TABLE "SYSTEM"."ORDERS" 
   (	"ORDER_ID" NUMBER(20,0), 
	"CREATEDDATE" DATE, 
	"UPDATEDDATE" DATE DEFAULT NULL, 
	"EMAIL_ADDRESS" VARCHAR2(45 BYTE), 
	"ORDER_STATUS" VARCHAR2(45 BYTE), 
	"ORDER_SUBTOTAL" NUMBER(10,2), 
	"CUSTOMER_ID" NUMBER(10,0), 
	"SHIPPING_ID" NUMBER(10,0)
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "SYSTEM" ;
REM INSERTING into SYSTEM.ORDERS
SET DEFINE OFF;
Insert into SYSTEM.ORDERS (ORDER_ID,CREATEDDATE,UPDATEDDATE,EMAIL_ADDRESS,ORDER_STATUS,ORDER_SUBTOTAL,CUSTOMER_ID,SHIPPING_ID) values (12188842071573416,to_date('02-FEB-18','DD-MON-RR'),to_date('02-FEB-18','DD-MON-RR'),'ram@gmail.com','Pending',164.88,604,290560413);
Insert into SYSTEM.ORDERS (ORDER_ID,CREATEDDATE,UPDATEDDATE,EMAIL_ADDRESS,ORDER_STATUS,ORDER_SUBTOTAL,CUSTOMER_ID,SHIPPING_ID) values (12188842074932864,to_date('02-FEB-18','DD-MON-RR'),to_date('02-FEB-18','DD-MON-RR'),'ram@gmail.com','Pending',164.88,604,290560413);
Insert into SYSTEM.ORDERS (ORDER_ID,CREATEDDATE,UPDATEDDATE,EMAIL_ADDRESS,ORDER_STATUS,ORDER_SUBTOTAL,CUSTOMER_ID,SHIPPING_ID) values (12188842075308552,to_date('02-FEB-18','DD-MON-RR'),to_date('02-FEB-18','DD-MON-RR'),'ram@gmail.com','Pending',185.13,604,290560413);
Insert into SYSTEM.ORDERS (ORDER_ID,CREATEDDATE,UPDATEDDATE,EMAIL_ADDRESS,ORDER_STATUS,ORDER_SUBTOTAL,CUSTOMER_ID,SHIPPING_ID) values (12188842077844144,to_date('02-FEB-18','DD-MON-RR'),to_date('02-FEB-18','DD-MON-RR'),'ram@gmail.com','Pending',500.45,604,211647978);
Insert into SYSTEM.ORDERS (ORDER_ID,CREATEDDATE,UPDATEDDATE,EMAIL_ADDRESS,ORDER_STATUS,ORDER_SUBTOTAL,CUSTOMER_ID,SHIPPING_ID) values (12188842080499328,to_date('02-FEB-18','DD-MON-RR'),to_date('02-FEB-18','DD-MON-RR'),'ram@gmail.com','Pending',38295,604,290560413);
Insert into SYSTEM.ORDERS (ORDER_ID,CREATEDDATE,UPDATEDDATE,EMAIL_ADDRESS,ORDER_STATUS,ORDER_SUBTOTAL,CUSTOMER_ID,SHIPPING_ID) values (20180202122640,to_date('02-FEB-18','DD-MON-RR'),to_date('02-FEB-18','DD-MON-RR'),'raviteja@gmail.com','Pending',185.13,1,338326);
Insert into SYSTEM.ORDERS (ORDER_ID,CREATEDDATE,UPDATEDDATE,EMAIL_ADDRESS,ORDER_STATUS,ORDER_SUBTOTAL,CUSTOMER_ID,SHIPPING_ID) values (12188841454681640,to_date('01-FEB-18','DD-MON-RR'),to_date('01-FEB-18','DD-MON-RR'),'ram@gmail.com','Pending',45045,604,290560413);
Insert into SYSTEM.ORDERS (ORDER_ID,CREATEDDATE,UPDATEDDATE,EMAIL_ADDRESS,ORDER_STATUS,ORDER_SUBTOTAL,CUSTOMER_ID,SHIPPING_ID) values (12188841454934112,to_date('01-FEB-18','DD-MON-RR'),to_date('01-FEB-18','DD-MON-RR'),'ram@gmail.com','Pending',45045,604,290560413);
--------------------------------------------------------
--  DDL for Index PK_ORDERID
--------------------------------------------------------

  CREATE UNIQUE INDEX "SYSTEM"."PK_ORDERID" ON "SYSTEM"."ORDERS" ("ORDER_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "SYSTEM" ;
--------------------------------------------------------
--  Constraints for Table ORDERS
--------------------------------------------------------

  ALTER TABLE "SYSTEM"."ORDERS" ADD CONSTRAINT "PK_ORDERID" PRIMARY KEY ("ORDER_ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "SYSTEM"  ENABLE;
  ALTER TABLE "SYSTEM"."ORDERS" MODIFY ("SHIPPING_ID" NOT NULL ENABLE);
  ALTER TABLE "SYSTEM"."ORDERS" MODIFY ("CUSTOMER_ID" NOT NULL ENABLE);
  ALTER TABLE "SYSTEM"."ORDERS" MODIFY ("ORDER_SUBTOTAL" NOT NULL ENABLE);
  ALTER TABLE "SYSTEM"."ORDERS" MODIFY ("ORDER_STATUS" NOT NULL ENABLE);
  ALTER TABLE "SYSTEM"."ORDERS" MODIFY ("EMAIL_ADDRESS" NOT NULL ENABLE);
  ALTER TABLE "SYSTEM"."ORDERS" MODIFY ("CREATEDDATE" NOT NULL ENABLE);
