View Single Post
Old 11-07-2012, 11:02 PM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,579
Thanks: 62
Thanked 4,063 Times in 4,032 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Show the actual trigger.

SHOW CREATE TRIGGER triggername;

The docs say it can work if done correctly.

Example:

Code:
delimiter //

CREATE TRIGGER yourname BEFORE INSERT ON t
FOR EACH ROW
   BEGIN
       SET NEW.b = 'whatever';
   END
//

delimiter ;
I just tried it. That worked perfectly in MySQL 5.5 for me.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote