我有一个带有“A”列的MySQL表,其中包含NaN值。你如何更新它们?我试过了
update myTable set A = 0 where A is NaN;
但它给了我一个语法错误。我如何查询NaN?
答案 0 :(得分:1)
您应该能够使用以下其中一项:
update myTable
set A = 0
where A = 'NaN';
OR
update myTable
set A = 0
where A LIKE '%NaN%';
答案 1 :(得分:0)
尝试
update myTable set A = 0 where A = 'NaN';
答案 2 :(得分:0)
尝试:
update myTable set A = '0' where A = 'NaN'