将值插入标识列db2

时间:2013-10-17 18:01:33

标签: insert db2 identity

您好我尝试将脚本中的数据插入到具有标识列的DB2表中。我使用语法阅读:

INSERT INTO SOME_TABLE OVERRIDING SYSTEM VALUE ...

会起作用,但事实并非如此。这是确切的查询:

INSERT INTO SCHEMA.MYTABLE OVERRIDING SYSTEM VALUE (
     IDENTITY_COLUMN
    ,SOMEVALUE
    ,CREATEDTIME
    ,UPDATEDTIME
) VALUES (
     2
    ,'656566'
    ,'2012-07-12 16:25:34'
    ,NULL
);

我收到以下错误:

SQL0104N  An unexpected token "VALUE" was found following "DE OVERRIDING 
SYSTEM".  Expected tokens may include:  "<space>".  SQLSTATE=42601

谢谢!

0 个答案:

没有答案