-
I'm new to using triggers and I'm having a tough time with a basic one. I'm just trying to write a BEFORE INSERT trigger that will evaluate a value in the insert statement, and only actually do the insert if it is a particular value. Otherwise, do not do the insert.
Lets say the table looks like this:
USERNAME VARCHAR(255)
OPERATION VARCHAR(255)
And I only want the INSERT to execute if the OPERATION value = "save".
So basically, how would this trigger be written, and specifically how do you refer to the values in the INSERT statement and how would you tell it to do nothing if it fails the evaluation.
Thanks in advance,
- David
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|