Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to let a SQL script abort when an error occurs ?

pstein-JavaNetMay 21 2007 — edited May 24 2012
I pass a longer SQL script with a lot of SQL and PL-SQL commands to SQLplus.

When SQLplus detects a syntax error or an SQL invalid operation is performed (e.g.INSERT with values against UNIQUE restriction) then SQLplus starts over with the next SQL statement in script.

How can I tell SQLPlus to stop further execution when the first error occurs?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 21 2012
Added on May 21 2007
12 comments
41,146 views