MySQL删除包含NaN的记录
我有一个MySQL表,其中的列“a”中有NaN值。如何更新它们?我试过了MySQL删除包含NaN的记录,mysql,Mysql,我有一个MySQL表,其中的列“a”中有NaN值。如何更新它们?我试过了 update myTable set A = 0 where A is NaN; 但它给了我一个语法错误。如何查询NaN?您应该能够使用以下选项之一: update myTable set A = 0 where A = 'NaN'; 或 您应该能够使用以下选项之一: update myTable set A = 0 where A = 'NaN'; 或 试一试 试一试 尝试: 尝试: @tadman他们没有
update myTable set A = 0 where A is NaN;
但它给了我一个语法错误。如何查询NaN?您应该能够使用以下选项之一:
update myTable
set A = 0
where A = 'NaN';
或
您应该能够使用以下选项之一:
update myTable
set A = 0
where A = 'NaN';
或
试一试
试一试
尝试:
尝试:
@tadman他们没有在列上指定数据类型,我猜是字符串。但是我MySQL允许类似于数字数据类型的语法-@tadman他们没有在列上指定数据类型,我猜是字符串。但是我在数字数据类型上允许类似的语法-
update myTable set A = 0 where A = 'NaN';
update myTable set A = '0' where A = 'NaN'