MySQL
文章平均质量分 58
123
Nothing impossible!
展开
-
Mysql日常函数
<br />备注: <br />其中Intolib为表的名称,inputtime为类型伟Datetime的字段 <br />查询当天记录: <br />select * from intolib where to_days(inputtime) = to_days(now()) <br />查询这个星期的记录: <br />select * from intolib where week(inputtime,1) = week(now(),1) and year(inputtime) = year(now(原创 2011-03-08 18:46:00 · 633 阅读 · 0 评论 -
Java 默认事务级别read committed对binlog_format的需求
java.sql.SQLException: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is原创 2015-01-13 15:19:55 · 795 阅读 · 0 评论 -
MySQL 的 EXPLAIN 用法
explain显示了mysql如何使用索引来处理select语句以及连接表。可以帮助选择更好的索引和写出更优化的查询语句。 使用方法,在select语句前加上explain就可以了: 如: explain select surname,first_name from a where a.id=1; EXPLAIN列的解释: table:显示这一行的原创 2015-02-09 14:40:12 · 437 阅读 · 0 评论