I have this query:
UPDATE phonecalls
SET Called = \"Yes\"
WHERE PhoneNumber = \"999 29-4655\"
My table is phonecalls
, I
For the benefit of anyone here from Google, this problem was caused by me because I was trying to append to an empty field using CONCAT()
.
UPDATE example SET data=CONCAT(data, 'more');
If data
is NULL
, then CONCAT()
returns NULL
(ignoring the second parameter), so the value does not change (updating a NULL
value to be a NULL
value), hence the 0 rows updated.
In this case changing to the CONCAT_WS()
function instead fixed the problem.