How do I update a table and set different values upon the condition evaluating to True.
For instance :
UPDATE Table
SET A = \'1\' IF A > 0 AND A &
Here's a query to update a table based on a comparison of another table. If record is not found in tableB, it will update the "active" value to "n". If it's found, will set the value to NULL
UPDATE tableA
LEFT JOIN tableB ON tableA.id = tableB.id
SET active = IF(tableB.id IS NULL, 'n', NULL)";
Hope this helps someone else.