为什么 MYSQL数据库,不能像 MSSQLserver中,使用默认函数,比如 now();我在
mysql> select timestampadd(minute,5,now());
+------------------------------+
| timestampadd(minute,5,now()) |
+------------------------------+
| 2008-02-20 09:48:16 |
+------------------------------+
1 row in set (0.00 sec)我想放在 sendtime 字段
mysql> select timestampadd(minute,5,now());
+------------------------------+
| timestampadd(minute,5,now()) |
+------------------------------+
| 2008-02-20 09:48:16 |
+------------------------------+
1 row in set (0.00 sec)我想放在 sendtime 字段
alter table yourtablename modify yourfield timestamp not null default current_timestamp;
2008-02-25 10:50:09
2008-02-20 10:56:47(返回 3 条记录)
(耗费 0 ms)