'@P0'附近有语法错误
做一个分页查询功能,使用到了TOP #{pagenum}然后就报错了。'@P0'附近有语法错误
未解决:#{pagenum}改成${pagenum},但是mybatis报参数未找到错误,
解决:将对应接口DAO,对应方法参数前加上@Param("pagenum")
select top 20 exm001.id,taskdsh.id,inputdate,checkid, proceedingname,taskdsh.isdeptapproved from exm001 inner join taskdsh on exm001.checkid=taskdsh.systemcode where exm001.id not in (select top ${pagenum} exm001.id from exm001 inner join taskdsh on exm001.checkid=taskdsh.systemcode order by exm001.inputdate desc) and taskdsh.operators=#{username}