软件下载 | 资讯教程 | 最近更新 | 下载排行 | 一键转帖 | 发布投稿
您的位置:最火下载站 > 网络编程 > MySQL > MySQL内置时间curdate查询用法

MySQL内置时间curdate查询用法

总结一下MySQL内置时间查询用法

mysql> SELECT year(curdate());
+-----------------+
| year(curdate()) |
+-----------------+
| 2009 |
+-----------------+
1 row in set (0.00 sec)

mysql> SELECT month(curdate());
+------------------+
| month(curdate()) |
+------------------+
| 8 |
+------------------+
1 row in set (0.00 sec)

mysql> SELECT day(curdate());
+----------------+
| day(curdate()) |
+----------------+
| 9 |
+----------------+
1 row in set (0.00 sec)

mysql> SELECT curdate();
+------------+
| curdate() |
+------------+
| 2009-08-09 |
+------------+
1 row in set (0.00 sec)

mysql> SELECT dayofmonth(curdate());
+-----------------------+
| dayofmonth(curdate()) |
+-----------------------+
| 9 |
+-----------------------+
1 row in set (0.00 sec)
    相关阅读
    网友评论
    栏目导航
    推荐软件