Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.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
使用替换字的SQLite更新字段_Sqlite - Fatal编程技术网

使用替换字的SQLite更新字段

使用替换字的SQLite更新字段,sqlite,Sqlite,我不擅长SQLite,因此出现了一个问题:如何将某些列从/media/Soft/outherpath字段更新为/media/username/Soft/outherpath? 问题是,从10.10升级到ubuntu 12.10后,我无法使用shotwell库,因为较新的ubuntu使用了/media/username/…进行挂载 谢谢你的回答 UPDATE some_table SET certain_column = substr(certain_column, 1, 6) || -- /

我不擅长SQLite,因此出现了一个问题:如何将某些列从
/media/Soft/outherpath
字段更新为
/media/username/Soft/outherpath
? 问题是,从10.10升级到ubuntu 12.10后,我无法使用shotwell库,因为较新的ubuntu使用了
/media/username/…
进行挂载

谢谢你的回答

UPDATE some_table
SET certain_column = substr(certain_column, 1, 6) ||   -- /media
                     '/username' ||
                     substr(certain_column, 7)         -- /Soft...
WHERE certain_column LIKE '/media/%'