Still learning SQL-Fu, and trying to figure out how to do a simple update on my Table (ex. [TABLE1])to where all rows that have a [COST]
column value of NULL
are updated to a [COST]
value of 0.00
.
Can anyone show me how this is properly done? I've found examples for how to update EVERY row value for the column, but haven't quite been able to piece together the WHERE condition in a functional way.
You can test for a NULL value in a column using IS NULL
.
UPDATE Table1
SET cost = 0
WHERE cost IS NULL;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With