Jörgen,
Friday, November 01, 2002, 11:06:38 AM, you wrote:

JW> I need to let the values in two columns change place with each other. 
JW> I've tried to "update xxx set a=b, b=a" but that doesn't work (b=a uses 
JW> the "new" a).

If you want to change place for all values, you can just rename
columns :-)

You can also add third column, f.e. "c"

UPDATE xxx SET c=a, a=b, b=c;

and then drop column "c";



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to