【问题标题】:Informix - Insert into column datetime year to secondInformix - 插入列日期时间年到秒
【发布时间】:2023-02-10 16:35:36
【问题描述】:

我用的是informix数据库。我需要将当前日期和当前时间插入列类型为“datetime year to second”的列中。

例子:

INSERT INTO example_table (my_example_date) VALUES( ??? );

它是如何工作的?

【问题讨论】:

  • ...VALUES (CURRENT)

标签: sql informix


【解决方案1】:

current 是你想要使用的,这里是我测试过的一个完整的工作示例:

create table example_table (my_example_date datetime year to second);
INSERT INTO example_table (my_example_date) VALUES( current );
select * from example_table;

给出:

2023-02-10 09:21:00.000

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-10-22
    • 1970-01-01
    • 1970-01-01
    • 2016-10-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多