42

我正在做一个简单的Oracle INSERT,但我不断收到此错误: [Err] ORA-00984: column not allowed here

INSERT INTO MY.LOGFILE
(id,severity,category,logdate,appendername,message,extrainfo)
VALUES
(
"dee205e29ec34",
"FATAL",
"facade.uploader.model",
"2013-06-11 17:16:31",
"LOGDB",
NULL,
NULL
)
4

1 回答 1

88

用单引号替换双引号:

INSERT
INTO    MY.LOGFILE
        (id,severity,category,logdate,appendername,message,extrainfo)
VALUES  (
       'dee205e29ec34',
       'FATAL',
       'facade.uploader.model',
       '2013-06-11 17:16:31',
       'LOGDB',
       NULL,
       NULL
       )

在 SQL 中,双引号用于标记标识符,而不是字符串常量。

于 2013-06-11T21:37:09.900 回答