nix, shell, perl, php, mysql and mac os x tips and tricks

Wednesday, July 9, 2008

MySQL use CONCAT and UPDATE together in mysql to add to an existing string

UPDATE products SET SHIPPING = CONCAT('+', SHIPPING) WHERE SHIPPING != "" AND SHIPPING REGEXP '^[^\+]'

No comments:

Post a Comment