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.
Comedian Shifts From Social Media to Stage
Rashan Dixon
September 14, 2026
4:21 PM
Fort Worth VC Firm Draws Institutional Backers
Sumit Kumar
September 14, 2026
4:15 PM
Why the Future of Content Creation Is Visual-First, Not Text-First
Jordan Williams
September 14, 2026
3:25 PM
Minimal Company Rethinks Its Distraction-Free Phone
Rashan Dixon
September 14, 2026
2:27 PM
S301 Orbit Could Probe Black Hole Spin
Steve Gickling
September 14, 2026
2:18 PM
Europe Redefines Control Over Digital Systems
Sumit Kumar
September 14, 2026
2:18 PM
Why Anthropic, OpenAI, and xAI Are Calling for an AI Development Slowdown
Johannah Lopez
September 14, 2026
12:01 PM
Scientists Spot Decagonal Wave Over Saturn
Deanna Ritchie
September 14, 2026
10:21 AM
AI in Retail: How Smart Operations Are Rewriting the Store
Rashan Dixon
September 14, 2026
8:00 AM
Building AI Governance Guardrails Before You Scale
Rashan Dixon
September 13, 2026
8:00 AM
Desktop CNC Is Finally Becoming Approachable
Joe Rothwell
September 12, 2026
1:08 PM
Why Retrieval Augmented Generation Matters for Trustworthy Business AI
Rashan Dixon
September 12, 2026
8:00 AM
MIT Tool Forecasts Plausible Extreme Weather
Deanna Ritchie
September 11, 2026
5:10 PM
Meta Launches AI Assistant Amid Privacy Concerns
Rashan Dixon
September 11, 2026
3:26 PM
Three Men Face Trial Over Ensenada Deaths
Steve Gickling
September 11, 2026
2:39 PM
New York Lawmaker Pushes AI Oversight
Steve Gickling
September 11, 2026
1:11 PM
Bond Market’s $160 Trillion Reach Explained
Rashan Dixon
September 11, 2026
1:03 PM
AI Demand Pushes Gadget Prices Higher
Sumit Kumar
September 11, 2026
12:23 PM
What Microsoft’s Tier-1 Rust Status Means for Your Team in 2026
Priya Nandakumar
September 11, 2026
12:15 PM
Blank Street Raises $105 Million for Expansion
Sumit Kumar
September 11, 2026
12:10 PM
Prompt Engineering for Teams: A Practical Guide to Better AI Output
Rashan Dixon
September 11, 2026
8:00 AM
AI’s Blind Spot Makes AGI Claims Premature
Joe Rothwell
September 11, 2026
7:43 AM
Windows Security Teams Face Busy Summer
Deanna Ritchie
September 10, 2026
3:15 PM
How Developers Build IT Infrastructure for Compliance in Financial ServicesÂ
Marcus Whitfield
September 10, 2026
3:01 PM
New Findings Probe Parasite Drug Resistance
Steve Gickling
September 10, 2026
2:17 PM






















