Hi All,
how to not display error message, after execution of 1 step in this script, but display successfully command execution in 2 step.
This solution should work without using PL/SQL, only SQL and SQL Plus commands.
WHENEVER SQLERROR CONTINUE SQL.SQLCODE
ALTER TABLE test DROP COLUMN project_id;
WHENEVER SQLERROR EXIT FAILURE SQL.SQLCODE
ALTER TABLE test ADD project_id NUMBER;
Output:
Error starting at line : 4 in command -
ALTER TABLE test DROP COLUMN project_id
Error report -
SQL Error: ORA-00904: "PROJECT_ID": invalid identifier
00904. 00000 - "%s: invalid identifier"
*Cause:
*Action:
Commit
table TEST altered.