|
发表于 2004-4-20 13:14:36
|
显示全部楼层
mysql> select current_date;//今天
+----------------+
| current_date() |
+----------------+
| 2004-04-07 |
+----------------+
1 row in set (0.00 sec)
mysql> select current_date()-1;//昨天
+------------------+
| current_date()-1 |
+------------------+
| 20040406 |
+------------------+
1 row in set (0.02 sec)
mysql> select sysdate();
+---------------------+
| sysdate() |
+---------------------+
| 2004-04-07 10:46:45 |
+---------------------+
1 row in set (0.00 sec) |
|