①concat在原有的基礎上追加內容
sql 語句:update 表名 set title=concat( title, '123') where id=1;
結果 id title
1 abc
更新后 1 abc123
②replace 替換原有字段內容里的值
sql 語句:update 表名 set title=replace( title, 'abc', 'cdef') where id=1;
結果 id title
1 abcggg
更新后 1 cdefggg
①concat在原有的基礎上追加內容
sql 語句:update 表名 set title=concat( title, '123') where id=1;
結果 id title
1 abc
更新后 1 abc123
②replace 替換原有字段內容里的值
sql 語句:update 表名 set title=replace( title, 'abc', 'cdef') where id=1;
結果 id title
1 abcggg
更新后 1 cdefggg
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。