写了一个函数,执行成功,在调用的时候提示错误,大家帮我看一下,什么地方写错了,谢谢各位了
delimiter $$
DROP FUNCTION IF EXISTS `zuitu_db`.`getCitynamesById`$$
create function `zuitu_db`.getCitynamesById(
ids varchar(200)
)
returns varchar(2000)
begin
declare citynames varchar(2000);
set @citynames='';
set @citynames:=(select GROUP_CONCAT(name) from category where id in (ids));
return @citynames;
end $$
delimiter ;这是函数主体。
函数调用:select getCitynamesById('1,2,3');
执行提示错误:incorrect string value ‘\xE6\xB5\x8E\xE5\x8D\x97' for column 'getCitynamesById('1,2,3')' at row 1
delimiter $$
DROP FUNCTION IF EXISTS `zuitu_db`.`getCitynamesById`$$
create function `zuitu_db`.getCitynamesById(
ids varchar(200)
)
returns varchar(2000)
begin
declare citynames varchar(2000);
set @citynames='';
set @citynames:=(select GROUP_CONCAT(name) from category where id in (ids));
return @citynames;
end $$
delimiter ;这是函数主体。
函数调用:select getCitynamesById('1,2,3');
执行提示错误:incorrect string value ‘\xE6\xB5\x8E\xE5\x8D\x97' for column 'getCitynamesById('1,2,3')' at row 1
解决方案 »
- 求SQL语句
- 请教 Mysql 数据按日期分组显示
- regexp '[[:digit:]]{2}'
- 大家帮帮忙,自定义函数报不能递归的错误,怎么解决?
- 用数据库替代session行不?
- MySQl怎么建立个用户连'information_schema'都不能访问
- My SQL 中,日期时间格式问题。
- 請問在windows下如何連接linux下的MYSQL請大家推荐几個好工具﹐不知道有沒有
- [mysql]如何从虚拟主机执行本地硬盘mysql数据库查询?
- 在WIN2000 server中安装了mysql,想要卸载它,但在卸载它之后,发现服务中还有mysql项。
- mysql版本
- MySQL日志有错误级别的概念吗?
执行一下show variables like 'character%'贴出结果