sqlite 替换某字段关键字的 SQL 语句

例如某个字段中有类似如下这样的内容

E:\Code
E:\Documents
E:\Movies
E:\Downloads

当我们需要批量把其中的路径从 E:\ 更换为 F:\ 的时候,就可以用到下面的方法:

UPDATE tableName
SET fieldName ='F:\' ||  substr(fieldName, 4)
WHERE fieldName  LIKE "E:\%"

代码来源:https://social.msdn.microsoft.com/Forums/vstudio/fr-FR/a73a2630-e224-47c6-aa81-346592b20cc2/sqlite-replace?forum=adonetzhchs&forum=adonetzhchs


Warning: Missing argument 1 for cwppos_show_review(), called in /home/wwwroot/www.mycode.net.cn/wp-content/themes/flat/content-single.php on line 29 and defined in /home/wwwroot/www.mycode.net.cn/wp-content/plugins/wp-product-review/includes/legacy.php on line 18

Notice: Undefined variable: post_id in /home/wwwroot/www.mycode.net.cn/wp-content/plugins/wp-product-review/includes/legacy.php on line 20

发表评论