How to create an oracle trigger to stop repition in a table.
Posted on 2004-05-03
I am trying to write an oracle trigger that when fired stops an insert into a table; it is fired if that insert is a repeation of an already inserted row, what I have is:
CREATE TRIGGER no_repition_lecturer
BEFORE INSERT OR UPDATE ON lecturer
FOR EACH ROW WHEN(new.forname=old.forname AND new.surname=old.surname)
:new.forname=NULL AND new.surname=NULL AND lid#=NULL