Combining 2 Mysql update statments(same col, different values, different conditions)
- by Paul Atkins
Hi guys,
I have been doing some searching but have not been able to find an answer for this so thought I would ask here as the people here know everything :)
I am trying to combine these 2 update queries into one query.
UPDATE addresses SET is_default='0' WHERE id!='1'
UPDATE addresses SET is_default='1' WHERE id='1'
I assume this should be too hard to accomplish but i cant seem to work it out :(
Thanks
Paul