简体   繁体   English

如何在 BigQuery 中将多个列的空值替换为 0?

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

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.我需要一次性将它们全部替换为 0,而无需单独替换每一列。 How can I do that in big query?我怎样才能在大查询中做到这一点?

Can you please try below query:你能试试下面的查询吗:

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

Hope it will work.希望它会起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM