Posted by Paul Lautman on 02/20/07 21:10
David Smithz wrote:
> Hi
>
> I have an mysql table.
>
> For particular set of rows I want to swap two of the values.
>
> So it would be something like
>
> update exampletable set
> field1= field 2
> field 2= field1
> where field3=value
>
> Is this possible? I was worried that doing this might make both the
> values the same because by time you get to
> field2 = field1, the value in field 1 has changed and that data is
> lost?
> this is using mysql.
>
> Thank in advance for any input.
If you are worried, why not try it out on a test table and see what happens?
Navigation:
[Reply to this message]
|