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 Insert Trigger on a table Code

742505Jan 18 2010 — edited Jan 18 2010
Hi ,
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.

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 15 2010
Added on Jan 18 2010
8 comments
1,027 views