我有一个表与此数据

id , name    , description
1  , apple   , ''
2  , orange  , ''

我想通过下面的语句更新该行这样描述栏是“苹果的递减”和“橙色的递减”,但它无法正常工作。

 Update TestTable Set description = 'desc of ' + name 

什么是正确的语法来连接字符串?

有帮助吗?

解决方案

的SQLite的串并置运算符是 “||”,而不是 “+

UPDATE TestTable SET description = 'desc of ' || name;
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top