Kayshav.com
About Developer Oracle 11g Technology Information Sitemap

Multi Row Data load 11g

-- The primary key value is populated by a before insert trigger
-- In 11g primary key column value can be directly assigned as
-- shown below.

CREATE OR REPLACE TRIGGER edw_sales_trans_bi_trig 
BEFORE INSERT ON edw_sales_detail
FOR EACH ROW

BEGIN
  :NEW.sales_tran_id := sales_tran_id_seq.NEXTVAL;
END edw_sales_trans_bi_trig;
/

INSERT ALL
 INTO edw_sales_detail(loc_id, cust_id,
      invoice_num, invoice_date, sales_amt, tax_amt, freight_amt) 
      VALUES (1, 10, '1001', SYSDATE, 1000.00, 50.00, 15.00)
 INTO edw_sales_detail(loc_id, cust_id,
      invoice_num, invoice_date, sales_amt, tax_amt, freight_amt) 
      VALUES (2, 11, '1002', SYSDATE, 2000.00, 75.00, 25.00)
SELECT * FROM DUAL;
COMMIT;

Oracle Multi Row Data load 11g output



Oracle 12c - Auto Numbering (Table design)

Oracle - Multi Row Load

Oracle 11gXEr2 - Index

Oracle registered trademark of Oracle Corporation.

Last Revised On: July 27, 2014

  39892