保留字字典摘抄于:https://blog.csdn.net/qq_22583191/article/details/104365202
首先出现这个错误就是因为绑定变量的时候出现了问题。
网上的解释主要如下:
1.是由于在插入数据的时候,两个填充变量之间没有逗号分隔
2.在绑定变量时,出现变量名和SQL保留字相同的情况
但是在我实际开发的过程中还发现了一个错误会导致此错误就是绑定变量名的类型不一致举个例子:
数据库中此处的SURVEY_NAME是varchar2类型,(2020-1-26删除)
在后续开发中发现即使在Oracle变量中使用OracleDbType.NVarChar在数据库中使用VarChar仍不影响运行!
因此导致这个错误的原因就是Oracle参数使用了:DATE
最后附上当上的Oracle语句:
/// <summary> /// 根据填写护士和时间获取信息 /// </summary> public string GetMED_KF_EISAIINSE_RECORD_INFO { get { return "select * from MED_KF_EISAIINSE_RECORD t where t.SURVEY_TIME=:DATE and t.SURVEY_NAME=:NURSE"; //TO_DATE(:DATE,'yyyy-mm-dd hh24:mi:ss') } }
后将:DATE改为:CHECKDATE即解决错误。(2020-1-26号补充)
但是在开发时,未注意这个细节:(注意!!!这边有两处错误这个:DATE是ORACLE的关键字这边需要替换掉!!!)
此时也会报这个错误。(这里这个strNurse对应数据库SURVEY_NAME字段)
最后附上保留字:
IS
ISOLATION
JOIN
KEY
KILL
LANGUAGE
LAST
LEADING
LEFT
LENGTH
LEVEL
LIKE
LIMIT
LINENO
LINES
LISTEN
LOAD
LOCAL
LOCK
LOGFILE
LONG
LOWER
MANUAL
MATCH
MAX
MERGE
MESSAGE
MIN
MINUTE
NONCLUSTERED
NONE
NOT
NULL
NULLIF
NUMERIC
OF
OFF
OFFSET
OFFSETS
ON
ONCE
ONLY
OPEN
OPTION
OR
ORDER
OUTER
OUTPUT
OVER
OVERFLOW
OVERLAPS
PAD
PAGE
PAGES
PARAMETER
PARTIAL
PASSWORD
PERCENT
PROCESSEXIT
PROTECTED
PUBLIC
PURGE
RAISERROR
READ
READTEXT
REAL
REFERENCES
REGEXP
RELATIVE
RENAME
REPEAT
REPLACE
REPLICATION
REQUIRE
RESERV
RESERVING
RESET
RESTORE
RESTRICT
RETAIN
RETURN
RETURNS
REVOKE
RIGHT
ROLLBACK
ROLLUP
ROWCOUNT
RULE
SAVE
SAVEPOINT
SCHEMA
SECOND
SECTION
SEGMENT
SELECT
SENSITIVE
SEPARATOR
SEQUENCE
SESSION_USER
SET
SETUSER
SHADOW
SHARED
SHOW
SHUTDOWN
SINGULAR
SIZE
SMALLINT
SNAPSHOT
SOME
SORT
SPACE
SQL
SQLCODE
SQLERROR
STABILITY
STARTING
STARTS
STATISTICS
SUBSTRING
SUM
SUSPEND
TABLE
TABLES
TAPE
TEMP
TEMPORARY
TEXT
TEXTSIZE
THEN
TIME
TIMESTAMP
TO
TOP
TRAILING
TRAN
TRANSACTION
TRANSLATE
TRIGGER
TRIM
TRUE
TRUNCATE
UNCOMMITTED
UNION
UNIQUE
UNTIL
UPDATE
UPDATETEXT
UPPER
USAGE
USE
USER
USING
VALUE
VALUES
VARCHAR
VARIABLE
VARYING
VERBOSE
VIEW
VOLUME
WAIT
WAITFOR
WHEN
WHERE
WHILE
WITH
WORK
WRITE
WRITETEXT
XOR
YEAR
ZONE
保留字字典摘抄于:https://blog.csdn.net/qq_22583191/article/details/104365202