使用的是spring的getSimpleJdbcTemplate().queryForObject来实现。我要查询一个表中数据,返回其中m-n条记录,但是我同时查出所有符合条件的记录数。比如
select count(userID),userID,username from table where username like '%test%' order by userID limit n,m。这种写法有问题,返回的时候只返回了一条记录。这里的count(userID)是指的所有符合username like '%test%'这个条件的的记录数。高手帮忙呀springmysql查询