MySQL Forums
Forum List  »  Chinese

mysql执行sql出错,中文出现乱码
Posted by: 宇 肖
Date: December 04, 2011 08:58PM

mysql 5.1 版本。

SQL语句如下:
SELECT * FROM ude.demo_employee_source where where c_name='黄伟"

SQLyog客户端执行时,返回信息如下:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where c_name='黄伟'

但是通过JDBC连接,返回信息却变成了:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where c_name='黄伟'' at line 1

其中的中文变成了乱码。

求教:可能出现这种问题的原因,以及解决方案。

Options: ReplyQuote


Subject
Views
Written By
Posted
mysql执行sql出错,中文出现乱码
56255
December 04, 2011 08:58PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.