Re: Setting a row's value to the primary key after insert
Try this:
delimiter //
CREATE TRIGGER calendar_insert_after AFTER INSERT
ON calendar
FOR EACH ROW
BEGIN
IF NEW.group_id IS NULL THEN
SET NEW.group_id = NEW.calendar_id;
END IF
END; //
delimiter ;
Subject
Views
Written By
Posted
3530
May 29, 2006 04:44AM
Re: Setting a row's value to the primary key after insert
1957
May 29, 2006 04:40PM
2303
May 29, 2006 07:13PM
2058
May 29, 2006 09:17PM
2300
May 29, 2006 09:27PM
2769
June 03, 2006 03:47PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.