随笔分类 -  MYSQL

摘要:1、执行顺序 语句模板: (8)SELECT (9)DISTINCT (11)<Top Num> <select list> (1)FROM [left_table] (3)<join_type> JOIN <right_table> (2)ON <join_condition> (4)WHERE 阅读全文
posted @ 2017-02-14 11:47 鲜橙 阅读(299) 评论(0) 推荐(0)
摘要:1、按小时统计的语句 select concat(date_format(gmt_create, "%Y-%m-%d %k:00~"), hour(gmt_create)+1, ":00") as 'time', count(*) as num from t_order where gmt_crea 阅读全文
posted @ 2017-02-14 11:43 鲜橙 阅读(599) 评论(0) 推荐(0)
摘要:一、data too long for column 'name' at row 1 1、现象:把数据库的字符集编码设置为utf-8,通过DOS界面向表的某一列插入汉字时会遇到类似 data too long for column 'name' at row 1 的错误。 2、错误原因: 3、解决的 阅读全文
posted @ 2016-02-09 16:35 鲜橙 阅读(367) 评论(0) 推荐(0)