> Hello, my name's Marlon. I have a question about sql and I need some help! 
> How can I do something like it using mysql? 
> update registre set (name='NewName' where lastname='OldLastName'), 
> (name='OldName' where lastname='NewLastName'); 

I _believe_ you can do it this way.  I'm sure someone will correct me if I am
mistaken:

UPDATE registare SET
CASE lastname WHEN 'OldLastName' 
THEN
  name = 'NewName'
WHEN 'NewLastName'
THEN
  name = 'OldName'
END;

Chris



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to