我用mysql 创建了一个存储过程   主体:select * from  a where  name = '北京';
出先错误 提示我的条见不正确! 如果把主体改成: select * from  a where id=1;  显示正常注: name  varchar
     id     int 
高手 帮忙!!!

解决方案 »

  1.   

    Client端只要配置好
    useUnicode=true
    characterEncoding=utf-8
    这两个属性。只要指定了,就不会乱码。utf-8可以,gb2312可以,gbk可以。指定了什么,Client就默认以这种
    编码转换SQL语句,服务器也就知道怎么转会去。
      

  2.   

    show variables like ‘character%’,修改编码
      

  3.   

    我在php程序中调用这样的存储过程可以。
    create procedure retrive_student( likename char(128) )
    begin
      select theno, thename from student where thename like concat( likename, '%');
    end
    但是在mysql.exe这个客户端中不能用中文。