我是靠谱客的博主 友好胡萝卜,最近开发中收集的这篇文章主要介绍h2 mysql 兼容_H2内存数据库对sql语句的支持问题 sql放到mysql数据库中能跑,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

### The error may involve com.yrs.modules.classes.stu.teacher.mapper.ClassesStuTeacherMapper.queryStudentInfoByclasses

### The error occurred while executing a query

### SQL: SELECT ysi.stu_id, ysi.stu_name, ysi.stu_avatar_url, COUNT(DISTINCT(ysp.create_time)) AS unreadCounts, MAX(ysp.create_time) AS createTime FROM (yrs_student_info ysi,yrs_classes_stu_teacher ycst,yrs_book_info ybi) LEFT JOIN yrs_stu_perception ysp ON (ysi.stu_id) = ysp.student_id AND ysp.perception_state = 1 AND ysp.check_state = 1 WHERE ycst.classes_id = ? AND ycst.user_type = 2 AND ycst.user_id = ysi.stu_id AND ysi.stu_status = 1 AND ybi.book_status = 1 GROUP BY ysi.stu_id

### Cause: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "SELECT

YSI.STU_ID,

YSI.STU_NAME,

YSI.STU_AVATAR_URL,

COUNT(DISTINCT(YSP.CREATE_TIME)) AS UNREADCOUNTS,

MAX(YSP.CREATE_TIME)

AS CREATETIME

FROM

(YRS_STUDENT_INFO YSI,[*]YRS_CLASSES_STU_TEACHER YCST,YRS_BOOK_INFO YBI)

LEFT JOIN YRS_STU_PERCEPTION YSP ON (YSI.STU_ID) = YSP.STUDENT_ID

AND YSP.PERCEPTION_STATE = 1

AND YSP.CHECK_STATE = 1

WHERE YCST.CLASSES_ID = ?

AND YCST.USER_TYPE = 2

AND YCST.USER_ID = YSI.STU_ID

AND YSI.STU_STATUS = 1

AND YBI.BOOK_STATUS = 1

GROUP BY

YSI.STU_ID "; expected "USE, RIGHT, LEFT, FULL, INNER, JOIN, CROSS, NATURAL, )"; SQL statement:

SELECT

ysi.stu_id,

ysi.stu_name,

ysi.stu_avatar_url,

COUNT(DISTINCT(ysp.create_time)) AS unreadCounts,

MAX(ysp.create_time)

AS createTime

FROM

(yrs_student_info ysi,yrs_classes_stu_teacher ycst,yrs_book_info ybi)

LEFT JOIN yrs_stu_perception ysp ON (ysi.stu_id) = ysp.student_id

AND ysp.perception_state = 1

AND ysp.check_state = 1

WHERE ycst.classes_id = ?

AND ycst.user_type = 2

AND ycst.user_id = ysi.stu_id

AND ysi.stu_status = 1

AND ybi.book_status = 1

GROUP BY

ysi.stu_id [42001-196]

最后

以上就是友好胡萝卜为你收集整理的h2 mysql 兼容_H2内存数据库对sql语句的支持问题 sql放到mysql数据库中能跑的全部内容,希望文章能够帮你解决h2 mysql 兼容_H2内存数据库对sql语句的支持问题 sql放到mysql数据库中能跑所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(51)

评论列表共有 0 条评论

立即
投稿
返回
顶部