需求:在一个字符串后面追加指定的
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
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/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/14661773/viewspace-2127863/