1. data
id int not null auto_increment key,
username char(50) not null default ''
2. meta
value int
The syntax for trigger is:
mysql> CREATE TRIGGER t BEFORE INSERT ON data
FOR EACH ROW INSERT INTO meta VALUES (5);Trigger time can be one: BEFORE or AFTER
Trigger even can be one: UPDATE, INSERT OR DELETE
No comments:
Post a Comment