Oracle Forall Update Multiple Tables In One QueryCust i, custtabi amounttabi ENDIF ENDLOOP Since the subscripts of our collections are not consecutive, we use use FORRALL. INDICES OF to iterate the subscripts. FORALL i IN INDICES OF custtab. INSERTINTO validorderscustname, amountVALUEScusttabi, amounttabi. Now lets process the order data differently extracting 2 subsets and storing each subset in a different table. Reinitialize the CUSTTAB and AMOUNTTAB collections FOR i IN custtab. FIRST. custtab. LASTLOOPIF amounttabi ISNULL OR amounttabi 0 THEN add a new element to the collectionrejectedordertab. EXTEND record original collection subscriptrejectedordertabrejectedordertab. LAST i ENDIF IF amounttabi 2. THEN Add a new element to the collectionbigordertab. EXTEND record original collection subscriptbigordertabbigordertab. LAST i ENDIF ENDLOOP. DML statement on one subset of elements, and another DML statement on a different subset. FORALL i INVALUES OF rejectedordertab. INSERTINTO rejectedorders VALUES custtabi, amounttabi FORALL i INVALUES OF bigordertab. INSERTINTO bigorders VALUES custtabi, amounttabi COMMIT END Verify that the correct order details were stored. SELECT custname Customer, amount Valid order amountFROM validorders SELECT custname Customer, amount Big order amountFROM bigorders SELECT custname Customer, amount Rejected order amountFROM rejectedorders.