怎样自动插入日期和时间字段?

一个表中有日期和时间字段,怎样在insert的时候自动将当前的日期和时间
存入该字段?
从别的地方查到是
insert into table1 values('aaa','bbb',today,now)
但是不好使。
应该怎么写?
谢谢。
---------------------------------------------------------------

select current_timestamp from rdb$database
---------------------------------------------------------------

假如是ib 6.x或以上, 或是 firebird, 便会有下面的数值

current_date (03/13/03)
current_time (03:40pm)
current_timestamp (03/13/03 03:40pm)

你可以像调用 'now', 'yesterday', 'tomorrow'一样, 直接使用的.

Published At
Categories with 数据库类
comments powered by Disqus