ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## ORDER BY 排序 进行排序查询时,只要调用orderBy方法,传入要排序的字段以及排序方式即可。 ``` SQL: SELECT * FROM `user` WHERE `id` BETWEEN ? AND ? AND `name` LIKE ? AND `create_time` IS NOT NULL ORDER BY id desc 参数: [1, 1640, %t%] ``` ``` Query<User> query = sqlManager.query(User.class); List<User> list = query.andBetween("id", 1, 1640) .andLike("name", "%t%") .andIsNotNull("create_time") .orderBy("id desc").select(); ```