mybatis中distinct和order by 的用法
1:帖一段sql在mybatis的代码select distinct student_id from t_student order by creat_time desc这段代码在数据库中是不会报错的,但是你开启服务后会报xml错误。解决办法是,order by的字段要在distinct中存在 即:select distinct student_id ,crea
原创
2018-01-13 11:54:10 ·
11121 阅读 ·
1 评论