badman
badman

Reputation: 339

Return all values and alternate a null column

I have 6 columns in a table, and a column called uuid has a null value for some rows.

I want to return any null value with "" and return all columns and rows, I've search around and seen some solutions with IFNULL, COALESCE but i seem to get the syntax wrong.

Upvotes: 0

Views: 152

Answers (1)

Rowan
Rowan

Reputation: 59

UPDATE table SET uuid = '' WHERE uuid IS NULL;
SELECT * FROM table;

These two should do the trick or do you just want to replace the null for this one query only and not permanently change it to ''?

Upvotes: 1

Related Questions