named "SOMEUSER" on the table phone_book. CREATE OR REPLACE TRIGGER hauschbc BEFORE INSERT ON SOMEUSER.phone_book BEGIN RAISE_APPLICATION_ERROR ( num => -20050, msg => 'Error message goes here.'); END; Now, when "SOMEUSER" is logged in after attempting any INSERT this error message will show: SQL Error: ORA-20050: Error message goes here. Custom errors such as this one has a restriction on what the num variable can be defined as. Because of the numerous other pre-defined errors this variable must be in the range of -20000 to -20999. References External links Microsoft SQL Server DROP TRIGGER MySQL Database triggers MySQL DB Create Triggers DB2 CREATE TRIGGER statement Oracle CREATE TRIGGER PostgreSQL CREATE TRIGGER Oracle Mutating Table Problems with DELETE CASCADE SQLite Query Language: CREATE TRIGGER Oracle's Documentation on Triggers Database management systems Events (computing) Articles with example SQL code