com.alibaba.druid.sql.parser.ParserException: syntax error,expect IS, actual EQ id
druid
阿里云计算平台DataWorks(https://help.aliyun.com/document_detail/137663.html) 团队出品,为监控而生的数据库连接池
项目地址:https://gitcode.com/gh_mirrors/druid/druid
·
Caused by: com.alibaba.druid.sql.parser.ParserException: syntax error, error in :’icle.id = comment.article_id’,expect IS, actual EQ id
解决方法:表的别名前加上as
原sql
SELECT
article.id as article_id,
article.title as article_title,
article.content as article_content,
article.author_id as article_author_id,
comment.id as comment_id,
comment.content as comment_content,
comment.date as comment_date
FROM
article article
LEFT JOIN
comment comment
ON
article.id = comment.article_id
现sql
SELECT
article.id as article_id,
article.title as article_title,
article.content as article_content,
article.author_id as article_author_id,
comment.id as comment_id,
comment.content as comment_content,
comment.date as comment_date
FROM
article as article
LEFT JOIN
comment as comment
ON
article.id = comment.article_id
阿里云计算平台DataWorks(https://help.aliyun.com/document_detail/137663.html) 团队出品,为监控而生的数据库连接池
最近提交(Master分支:4 个月前 )
933dee04 - 8 天前
3246166f
- Add constructor with SQLParserFeature support to SparkStatementParser
- Fix SQLParserUtils to pass features parameter to SparkStatementParser, CKStatementParser and StarRocksStatementParser 17 天前
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐



所有评论(0)