Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/74.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
我想替换列文本测试';在SQL中使用replace命令作为测试_Sql_Replace - Fatal编程技术网

我想替换列文本测试';在SQL中使用replace命令作为测试

我想替换列文本测试';在SQL中使用replace命令作为测试,sql,replace,Sql,Replace,我想使用SQL中的replace命令将列文本测试替换为测试。 我试过使用 UPDATE table SET column = REPLACE(column, 'test's', 'test'); 但在测试中,它将“作为额外的引号。要在字符串常量中包含一个引号,只需将其加倍: UPDATE table SET column = REPLACE(column, 'test''s', 'test'); 要在字符串常量中包含单引号,只需将其加倍: UPDATE table

我想使用SQL中的replace命令将列文本测试替换为测试。 我试过使用

UPDATE table 
    SET column = REPLACE(column, 'test's', 'test');

但在测试中,它将“作为额外的引号。

要在字符串常量中包含一个引号,只需将其加倍:

UPDATE table
    SET column = REPLACE(column, 'test''s', 'test');

要在字符串常量中包含单引号,只需将其加倍:

UPDATE table
    SET column = REPLACE(column, 'test''s', 'test');
试试这个

UPDATE table 
SET column = REPLACE(column, 'test''s', 'test');

试试这个

UPDATE table 
SET column = REPLACE(column, 'test''s', 'test');