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!

Before each row - delete trigger issue

user9216096Jul 8 2019 — edited Jul 8 2019

We have trigger set up for Delete statement before each row in <tablename>,

Before Each row trigger

begin

if :old:<column_name> = ' ' then

RAISE_APPLICATION_ERROR

(-20001,'Cannot delete <tablename> record with blank <column name> column');

end if;

end;

But, while deleting the records getting below errors, even when we add where condition in delete query as <column_name>  <> '  ' (column not equal to blank)

Error information:

ORA-20001: Cannot delete <tablename> record with blank <column name> column

ORA-06512: at "<triggername>", line 3

ORA-04088: error during execution of trigger <trigger name>

Can you let me know how to resolve this trigger issue. Thanks in advance.

Comments
Post Details
Added on Jul 8 2019
11 comments
1,600 views