On Wed, Aug 02, 2006 at 12:35:30AM +0200, Martin Jespersen wrote:
> I just ran the following sql (on mysql 4.1.20):
>
> update tbl set col1=col2, col2=col1
I went through this recently with the MySQL folks and the long and
short of it is that the above statement is undefined in MySQL. It may
s
it's a frequent operation based on a where clause
Barry Newton wrote:
At 06:35 PM 8/1/2006, Martin Jespersen wrote:
I just ran the following sql (on mysql 4.1.20):
update tbl set col1=col2, col2=col1
To my surprise, mysql updates col1 via col1=col2 before reading it for
use in col2=col1, s
At 06:35 PM 8/1/2006, Martin Jespersen wrote:
I just ran the following sql (on mysql 4.1.20):
update tbl set col1=col2, col2=col1
To my surprise, mysql updates col1 via col1=col2 before reading it for use
in col2=col1, so I end up with the same value in both columns, which, of
course, was n
I just ran the following sql (on mysql 4.1.20):
update tbl set col1=col2, col2=col1
To my surprise, mysql updates col1 via col1=col2 before reading it for
use in col2=col1, so I end up with the same value in both columns,
which, of course, was not my intention. Thinking about it, this behavi