Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] select bill_segment segment from t_billsas 解析报错:token SEGMENT #6324

Open
yswang0927 opened this issue Jan 14, 2025 · 0 comments

Comments

@yswang0927
Copy link

yswang0927 commented Jan 14, 2025

Database Type

oracle

Database Version

11g

Druid Version

1.2.23

JDK Version

jdk1.8

Error SQL

select bill_segment segment from t_billsas

Testcase Code

String sql  = "select bill_segment segment from t_billsas";

List<SQLStatement> stmtList = SQLUtils.parseStatements(sql, JdbcConstants.ORACLE);
SQLStatement stmt = stmtList.get(0);
System.out.println(stmt.toString());

Stacktrace Info

Exception in thread "main" com.alibaba.druid.sql.parser.ParserException: TODO : pos 27, line 1, column 21, token SEGMENT
	at com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.parseStatementList(OracleStatementParser.java:745)
	at com.alibaba.druid.sql.SQLUtils.parseStatements(SQLUtils.java:600)
	at com.alibaba.druid.sql.SQLUtils.parseStatements(SQLUtils.java:621)
	at druid.Test.main(Test.java:20)

上面的SQL语句在oracle数据库上可以正确执行(已在 DBeaver 和 Navicat上测试过)。

@yswang0927 yswang0927 changed the title [BUG] select bill_segment SEGMENT from t_billsas 解析报错:token SEGMENT [BUG] select bill_segment segment from t_billsas 解析报错:token SEGMENT Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant