Mysql 相关(持续更新)

查询某个数据库中表个数的sql语句

SELECT COUNT(*) TABLES, table_schema FROM information_schema.TABLES   WHERE table_schema = 'db_name' GROUP BY table_schema;

查看自己的mysql数据库支持的引擎有哪些

mysql> show engines;

Mysql 相关(持续更新)_第1张图片

Mysql提供函数datediff来输出两个日期之间相差的天数

mysql> SELECT DATEDIFF('2017-04-08','2017-04-01') AS DiffDate;
+----------+
| DiffDate |
+----------+
|        7 |
+----------+
1 row in set (0.00 sec)

你可能感兴趣的:(Mysql)