Skip to Main Content

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
Post Details
Added on May 21 2007
12 comments
39,110 views