Re: Create Trigger Syntax MYSQL V 5.5.8
Posted by:
Pestlett .
Date: April 20, 2011 06:12PM
Here is a sample to play with, but before you use it I suggest you carefully read the links referenced here:
http://forums.mysql.com/read.php?99,243920,243920#msg-243920
DELIMITER $$
CREATE TRIGGER insert_for_sale AFTER INSERT ON items
FOR EACH ROW
BEGIN
INSERT INTO for_sale(ID, Price) VALUES (NEW.ID, NEW.Price);
END;$$
DELIMITER ;
This is assuming that there is also an ID and Price Column in the items table, if not replace them with the appropriate column names from the items table.
Good Luck.
Subject
Views
Written By
Posted
4574
April 20, 2011 08:26AM
1956
April 20, 2011 05:04PM
Re: Create Trigger Syntax MYSQL V 5.5.8
1965
April 20, 2011 06:12PM
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.