MySQL内置时间curdate查询用法
Jun 07, 2016 pm 02:53 PMmysql SELECT year(curdate()); +-----------------+ | year(curdate()) | +-----------------+ | 2009 | +-----------------+ 1 row in set (0.00 sec) mysql SELECT month(curdate()); +------------------+ | month(curdate()) | +------------------+
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)

熱門文章

熱門文章

熱門文章標籤

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

如何修復 MySQL 8.4 上的 mysql_native_password 未載入錯誤
