mySQL - Swap data in a field between two rows
| From: | Vincent P. Cocciolone | Date: | Sat, 17 Mar 2001 16:32:04 +0000 |
| Subject: | mySQL - Swap data in a field between two rows | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-44398@lists.php.net to get a copy of this message | ||
There must be an easy way, but it escapes me.
How can I switch the data in a feild of one row with the data in that field of
another row?
example:
row: id=1 fname=John lname=Doe
row: id=2 fname=Mary lname=Poppins
to:
row: id=2 fname=John lname=Doe
row: id=1 fname=Mary lname=Poppins
Thanks...