Before Insert Trigger on a table Code
742505Jan 18 2010 — edited Jan 18 2010Hi ,
I have a table Dr_seek(Dr_name,reg_no,pat_name)
I want to write a code for a before insert trigger on Dr_seek table.
The trigger should raise an application error(raise_application_error) throwing an error message that "patient's case was already handled by a doctor."
The trigger should restrict new insertions if reg_no is already inserted in the table.
If reg_no is not inserted in table , we have to be able to insert a new record.