Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
MySQL删除包含NaN的记录_Mysql - Fatal编程技术网

MySQL删除包含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他们没有

我有一个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他们没有在列上指定数据类型,我猜是字符串。但是我MySQL允许类似于数字数据类型的语法-@tadman他们没有在列上指定数据类型,我猜是字符串。但是我在数字数据类型上允许类似的语法-
 update myTable set A = 0 where A = 'NaN';
update myTable set A = '0' where A = 'NaN'