字串拼接應用

jasperjohn發表於2016-11-05
需求:在一個字串後面追加指定的json串(一般是json串)

CREATE PROCEDURE `update_add_white`(
in update_info VARCHAR(255)

COMMENT '增加白名單' 
BEGIN
set @update_whilte=(select left(cfg_value,LENGTH(cfg_value)-1) from common_config_bak where id=112);
set @updated_whilte=(select concat(@update_whilte,update_info));
update common_config_bak set cfg_value=@updated_whilte where id=112;
set @updated_info=(select cfg_value from common_config_bak where id=112);
select @updated_info 'updated_info';
END 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/14661773/viewspace-2127863/,如需轉載,請註明出處,否則將追究法律責任。

相關文章