sqlite 有批量替換的語(yǔ)法么 類(lèi)似mysql的update `xxx` set `xx`=REPLACE(`abc`, 'aaa', 'bbb');謝謝?。∧壳霸趕ql語(yǔ)氣中用 php函數(shù)str_replace()來(lái)暫時(shí)解決了,看看有沒(méi)有sqlite內(nèi)置函數(shù)有沒(méi)有REPLACE,語(yǔ)法如何寫(xiě)
1 回答

慕森卡
TA貢獻(xiàn)1806條經(jīng)驗(yàn) 獲得超8個(gè)贊
sqlite也是有replace函數(shù)的,你的意圖可以實(shí)現(xiàn):
replace(X,Y,Z)
The replace(X,Y,Z) function returns a string formed by substituting string Z for every occurrence of string Y in string X. The BINARY collating sequence is used for comparisons. If Y is an empty string then return X unchanged. If Z is not initially a string, it is cast to a UTF-8 string prior to processing.
- 1 回答
- 0 關(guān)注
- 1681 瀏覽
添加回答
舉報(bào)
0/150
提交
取消