net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "function" "FU

问题描述:

13:07:52.444 [WARN ] c.b.m.e.p.i.PaginationInnerInterceptor - optimize this sql to a count sql has exception, sql:"SELECT id,software_id,office_software_name,version,username,software_key,purchase_date,invalidation_date,function,purchase_num,supplier_name,supplier_address,supplier_teleph,supplier_email,note,create_time,update_time,creator_id,modifier_id,is_valid FROM t_office_software_info", exception:
net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "function" "FUNCTION"
at line 1, column 107.

Was expecting one of:

"!"
"("
"*"
"+"
"-"
":"
"?"
"@"
"@@"
"ACTION"
"ANY"
"BYTE"
"CASCADE"
"CASE"
"CAST"
"CHANGE"
"CHAR"
"CHARACTER"
"COLUMN"
"COLUMNS"
"COMMENT"
"COMMIT"
"CREATE"
"CURRENT"
"CYCLE"
"DESCRIBE"
"DISABLE"
"DO"
"DOUBLE"
"DUPLICATE"
"ENABLE"
"END"
"EXTRACT"
"FALSE"
"FIRST"
"FN"
"FOLLOWING"
"GROUP"
"GROUP_CONCAT"
"IF"
"IIF"
"INDEX"
"INSERT"
"INTERVAL"
"ISNULL"
"KEY"
"LAST"
"LEFT"
"LIMIT"
"MATCH"
"MATERIALIZED"
"NEXTVAL"
"NO"
"NOLOCK"
"NOT"
"NULL"
"NULLS"
"OFFSET"
"ON"
"OPEN"
"OPTIMIZE"
"ORDER"
"OVER"
"PARTITION"
"PATH"
"PERCENT"
"PRECISION"
"PRIMARY"
"PRIOR"
"PROCEDURE"
"RANGE"
"READ"
"REPLACE"
"RIGHT"
"ROW"
"ROWS"
"SCHEMA"
"SEPARATOR"
"SESSION"
"SET"
"SIBLINGS"
"SIZE"
"START"
"TABLE"
"TEMP"
"TEMPORARY"
"TOP"
"TRUE"
"TRUNCATE"
"TYPE"
"UNSIGNED"
"VALIDATE"
"VALUE"
"VALUES"
"VIEW"
"XML"
"ZONE"
"{"
"{d"
"{t"
"{ts"
"~"
<K_DATETIMELITERAL>
<K_DATE_LITERAL>
<K_TIME_KEY_EXPR>
<S_CHAR_LITERAL>
<S_DOUBLE>
<S_HEX>
<S_IDENTIFIER>
<S_LONG>
<S_QUOTED_IDENTIFIER>

解决:

数据字段含有 关键字 function

 

上一篇:Uncaught SyntaxError: Invalid or unexpected token


下一篇:Uncaught SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>)