How do I replace nulls with 0 for multiple columns together in BigQuery?

Viewed 633

I have multiple columns that include null values. I need to replace them all with 0 in one go without individually replacing for each column. How can I do that in big query?

1 Answers

Can you please try below query:

#standardSQL
UPDATE <tablename>
SET 
    column1 = 0,
    column2 = 0,
    column3 = 0,
    .
    .
    .
    columnN = 0
where <condition>

Hope it will work.

Related