MySQL Forums
Forum List  »  Triggers

Re: trigger to create a log file
Posted by: Roland Bouman
Date: February 07, 2006 02:09PM

? You can assign to NEW.<columnname> in a BEFORE INSERT TRIGGER. At least it works perfectly for me.

It's no use assigning to an OLD value (don't know if it's allowed, but it does not make sense). Same goes for assigning to either OLD or NEW in an AFTER trigger (the action has already taken place)
To complete the list: OLD does not make sense inside an INSERT trigger; same goes for NEW inside a DELETE trigger.

What statement are you having trouble with exactly? (include the complete statement, and error message if applicable)

Options: ReplyQuote


Subject
Views
Written By
Posted
16199
February 06, 2006 04:14AM
8094
February 06, 2006 06:32PM
4410
February 07, 2006 04:15AM
4272
February 07, 2006 05:43AM
3711
February 07, 2006 07:06AM
3762
February 07, 2006 07:22AM
3363
February 07, 2006 10:28AM
Re: trigger to create a log file
3461
February 07, 2006 02:09PM


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.