选项default-charaset-set=utf8;

然后创建一个数据表 create table a_table(b varchar(255) not null);

insert into a_table values('北京');

这个时候插入的是中文,系统会报告错误:Incorrect string value: 'xB1xB1xBExA9' for column 'b' at;

这个不能插入中文。如果该语句写在了一个文本文件中进行批处理操作,保存的编码是默认的话也会出现这种的错误提示。

解决办法:把文本文件存成utf-8格式的就可以正确执行。

 

相关文章:

  • 2021-10-19
  • 2021-10-21
  • 2021-06-03
  • 2022-12-23
  • 2021-12-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-28
  • 2022-01-03
  • 2022-12-23
  • 2022-01-11
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案