--以下是插入语句: insert into sms_inbox values('123456','123456', 'cd', sysdate(), '今天天 气很好', 1, sysdate(), '123456'); --报错: ERROR 1366 (HY000): Incorrect stringvalue: '\xBD\xF1\xCC\xEC\xCC\xEC...' for co lumn 'MESSAGECONTENT' at row 1 --解决:设置编码 set names g
1. into outfile filename; Mysql查询结果导出为Excel的几种方法 mysql> use world; # 使用 mysql 自带的 world 数据库 mysql> select * from country into outfile "xx\\xx.xx"; # 这样输出的结果便不会显示在命令行,而是导出到文件: 注意:windows 下路径分隔符用 \\(windows 默认是单斜杠). 2. The MySQL server is ru
将多条数据组合到一行 ) set @sql='select ''roleinfo:''' ) declare cursor1 cursor for select id from Userrole where 登录名='tl' open cursor1 fetch next from cursor1 into @column begin set @sql=@sql+','+@column+'as id,(select 角色 from UserRole as s where s.id='+@colu
今天读取solr里面的数据,往mysql插入时报错, Incorrect string value: '\xF0\x9F\x93\x8D\xE8\x88...' for column 'title' at row 1 原因是标题有Emoj表情相关字符,因为我这边不需要保留Emoj表情,不需要复原显示,所以我选择了简单的方式,过滤字符. byte[] b_text=title3.getBytes(); for (int i = 0; i < b_text.length; i++) { if((b_