mysql知识
1.修改mysql 不显示中文:(现在在福建朝日,编码都用gbk)
mysql> SHOW VARIABLES LIKE 'character%';
mysql> SET character_set_client = utf8 ;
mysql> SET character_set_connection = utf8 ;
mysql> SHOW VARIABLES LIKE 'collation_%';
3.修改表的编码:ALTER TABLE `category` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin
以上命令就是将一个表category的编码改为utf8
4.修改字段的编码:
ALTER TABLE `test` CHANGE `dd` `dd` VARCHAR( 45 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
以上命令就是将test表中 dd的字段编码改为utf8
4.mysql时间模糊查询:
select * from t_client_waiting_area where datediff(rec_update_datetime,'2013-07-22')=0