If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > TRIGGER with @variable

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-24-10, 06:15
vivoices vivoices is offline
Registered User
 
Join Date: Jul 2009
Posts: 45
TRIGGER with @variable

Hi,
is it possible to determine which field was updated in an AFTER UPDATE TRIGGER?

Or is it possible to save data in @variables in a BEFORE UPDATE TRIGGER and read the @variables in an AFTER UPDATE TRIGGER?

Or can I determine which row will be updated in a BEFORE UPDATE TRIGGER (like by reading the id of the primary key from a system variable)?


Thanks,
David

Last edited by vivoices; 04-24-10 at 06:37.
Reply With Quote
  #2 (permalink)  
Old 04-24-10, 06:43
vivoices vivoices is offline
Registered User
 
Join Date: Jul 2009
Posts: 45
No need for variables, using the aliases OLD and NEW solves one problem.
Reply With Quote
Reply

Tags
trigger, variables

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On