mysql命令行下的编码转换查询

时间:2021-05-16 08:39:09
原文见:http://msfconsole.blog.163.com/blog/#m=0&t=1&c=fks_084070086085087074087081086095086087081065080087086068087
mysql> use hehe; Database changed mysql> select * from mm; +----+------+------+-------+----------+---------+---------+ | id | name | age  | money | services | address | remarks | +----+------+------+-------+----------+---------+---------+ | 17 | ??   |    0 |     0 | ????     | ????    | ??????? | | 18 | ??   |   25 |     0 | ????     | ???     | ??????? | +----+------+------+-------+----------+---------+---------+ 2 rows in set (0.00 sec)
mysql> set names gbk; Query OK, 0 rows affected (0.00 sec)
mysql> select * from mm; +----+------+------+-------+----------+----------+----------------+ | id | name | age  | money | services | address  | remarks        | +----+------+------+-------+----------+----------+----------------+ | 17 | 店名 |    0 |     0 | 项目清单 | 详细地址 | 您的评价很重要 | | 18 | 店名 |   25 |     0 | 项目清单 | 石桥铺   | 您的评价很重要 | +----+------+------+-------+----------+----------+----------------+ 2 rows in set (0.00 sec)
mysql>