我正在做一个简单的 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
)
答案 0 :(得分:61)
将双引号替换为单引号:
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中,双引号用于标记标识符,而不是字符串常量。