I am trying to intercept any DELETE commands for a specific table. MySQL supports triggers, but doesn't seem to support a way to raise errors like SQL Server and other databases.
Can I do this with just an empty trigger definition? Sort of:
create trigger trListsDelete on lists
instead of delete
as
begin
end
In SQL Server, I can add a statement RAISEERROR('You cannot delete lists.')to make it crash, and this way I know that Delete will not be executed. Since MySQL does not support error collection, how to simply ignore the Delete command?
source
share