随笔分类 - mysql数据库
摘要:用到GROUP BY 语句查询时com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression 2 of SELECT list is not in GROUP BY clause and contains nonaggre
阅读全文
摘要:由于MySQL设计时不支持full outer join, 所以如果有全连接需求时,需要一点小技巧来实现。 假设有两个表t1,t2 full outer join 的效果和下面的效果一样: SELECT FROM t1 LEFT JOIN t2 ON t1.id = t2.id UNION SELE
阅读全文
摘要:函数语法: group_concat( [DISTINCT] 要连接的字段 [Order BY 排序字段 ASC/DESC] [Separator '分隔符'] ) 下面举例说明: select from goods; + + + | id| price| + + + |1 | 10| |1 | 2
阅读全文
摘要:http://www.jb51.net/article/76521.htm
阅读全文
摘要:虫师博客(Python使用MySQL数据库(新)): https://www.cnblogs.com/fnng/p/3565912.html 1.更改表的结构,增加一个字段放置新增的属性 alter table table_name add column_name type 2.更改已经建立的数据库
阅读全文
摘要:日期和时间数据类型 MySQL数据类型 含义 date 3字节,日期,格式:2014 09 18 time 3字节,时间,格式:08:42:30 datetime 8字节,日期时间,格式:2014 09 18 08:42:30 timestamp 4字节,自动存储记录修改的时间 year 1字节,年
阅读全文

浙公网安备 33010602011771号