Everybody knows that it takes a long time to insert a large number of records into a table. To improve the speed of insertion, you can use the PL/SWL loop FORALL.
In PL/SQL, use a cursor to fetch the rows from one table and insert them into the other table.
To reduce fetching time, do a BULK COLLECT INTO:
FETCHBULK COLLECT INTOLIMIT
To insert the fetched row, use the FORALL loop.
FORALL INDX IN .. SAVE EXCEPTIONS
You can also handle Exceptions by using the SAVE EXCEPTIONS option in the FORALL loop. Here, the FORALL loop acts as a bulk insert. When it encounters an exception, it just saves it and continues with the next record.
To view the exceptions that occurred during the insert, include the following statement after the FORALL loop:
EXCEPTIONWHEN bulk_errors THENFOR indx IN 1 .. SQL%BULK_EXCEPTIONS.COUNTLOOPerrno := SQL%BULK_EXCEPTIONS(indx).ERROR_INDEX;errmsg := SQLERRM(-1 * SQL%BULK_EXCEPTIONS(indx).ERROR_CODE);END LOOP;END;
Placing the keyword SAVE EXCEPTIONS in the FORALL loop stores all the encountered exceptions in BULK_EXCEPTIONS. Thus, the FORALL loop can be used for Bulk Insert and even Exceptions can be handled in that.
NOTE: The keyword SAVE EXCEPTIONS in the FORALL loop works only in Oracle9i.
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.
Related Posts
- Embarcadero?? Delivers New 24/7 Performance Insights and Team Capabilities with DB PowerStudio?? 2016
- Comparing Two Integers
- ?????????????????? ?????????????????? ??????????????
- David Keith champions geoengineering to combat warming
- EnterpriseDB and Quru Join G-Cloud to Expand Postgres Access for Public Sector
About Our Editorial Process
At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.
See our full editorial policy.
Baby Brains Offer Clues For AI
Rashan Dixon
July 17, 2026
2:54 PM
CXMT IPO Fees Lift China Bankers
Deanna Ritchie
July 17, 2026
2:40 PM
Claude Maker Eyes Trillion-Dollar Market Debut
Sumit Kumar
July 17, 2026
1:26 PM
Building Enterprise eCommerce Stores for Dubai Businesses: Architecture, Scalability, and Best Practices
Marcus Whitfield
July 17, 2026
1:21 PM
Google Flags AI Brand-Impersonation Scam
Rashan Dixon
July 17, 2026
1:17 PM
Why Velangani Divya Vardhan Kumar Bandi Builds Data Systems as Products, Not Pipelines
Marcus Whitfield
July 17, 2026
1:04 PM
AI Assistants Should Serve, Not Run You
Joe Rothwell
July 17, 2026
11:44 AM
Cambrian Raises $6 Million For Blockchain Data
Sumit Kumar
July 17, 2026
10:37 AM
Wychavon Councillor Urges Public Responsibility To Protect Services
Steve Gickling
July 17, 2026
10:27 AM
Anthropic Launches Claude Cowork On Web And Mobile
Steve Gickling
July 17, 2026
9:48 AM
Legal Fight Erupts Over Paramount-WBD Deal
Kirstie Sands
July 16, 2026
4:42 PM
MIT Appoints David Autor Economics Head
Rashan Dixon
July 16, 2026
2:52 PM
Why LG’s Dual-Mode Displays Win Now
Joe Rothwell
July 16, 2026
1:07 PM
Australia Flags Gaps In Big Tech Safety
Deanna Ritchie
July 16, 2026
12:31 PM
Mercado Bitcoin Evolves Into Regulated Platform
Sumit Kumar
July 16, 2026
10:35 AM
New Gadget Targets Digital Distractions
Sumit Kumar
July 16, 2026
9:14 AM
New AI Model Triggers Washington Scrutiny
Rashan Dixon
July 16, 2026
9:03 AM
Desk Gadgets Gain Ground In Workspaces
Rashan Dixon
July 15, 2026
4:19 PM
Development Bank Targets Fivefold Investment Surge
Sumit Kumar
July 15, 2026
2:32 PM
From Prototype to Production: Hiring AI Engineers Who Can Deliver
Finn Mccoy
July 15, 2026
1:51 PM
Anthropic Redeploys Claude Fable 5 July 1
Kirstie Sands
July 15, 2026
11:43 AM
Russia Halts Diesel Exports Amid Strikes
Sumit Kumar
July 15, 2026
9:43 AM
Spring Housing Relief Remains Elusive Again
Steve Gickling
July 15, 2026
9:38 AM
SoftBank’s Son Rejects AI Bubble Fears
Deanna Ritchie
July 15, 2026
9:13 AM
GPT 5.6 Is The Leap We Needed
Joe Rothwell
July 14, 2026
6:45 AM





















