Rubens Jr. wrote:

Is the update command executed in same order that was writen in the sql command ? example : UPDATE t1 SET f1 = f2, f2 = 'xxxx' WHERE .... Is garanted that with this command f1 will have the value of f2 BEFORE f2 receive value xxx ? I need to save the value of f2 than update f2, but I'm not shure that this may be done with only one sql command ...


The right-hand side of every term is evaluated first, before any changes are made. So you can say this:

UPDATE t1 SET f1=f2, f2=f1;

And it will swap the values of F1 and F2.


-- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to