问题
According to MySQL
In a before update trigger there are two mysql extensions viz NEW and OLD to refer to the old and new column values of the updating row.
Say, my table is :
create table foo ( id primary key auto_increment,
fname varchar(10),
lname varchar(10)
);
And I have inserted 1 row:
insert into foo (fname,lname) values ("Edam","Chuti");
If I run an update like :
update foo set fname="Edam1" where id=1;
Then in my before update trigger for this table what will be the values of :
NEW.fname=?
NEW.lname=?
来源:https://stackoverflow.com/questions/26083724/what-are-the-values-of-columns-which-are-not-set-in-a-before-update-trigger