请教大神,使用HibernateTemplate执行SQL语句报错,但是SQL在数据库中执行没有问题 10
报错信息:“com.microsoft.sqlserver.jdbc.SQLServerException:关键字'and'附近有语法错误”SQL语句:selecttop...
报错信息:“com.microsoft.sqlserver.jdbc.SQLServerException: 关键字 'and' 附近有语法错误”
SQL语句:
select top " + pageSize + " * from company where invisiable = 'Y' and id not in (select top " + pageSize*(pageNo-1) + " id from company where invisiable = 'Y' order by id) order by id 展开
SQL语句:
select top " + pageSize + " * from company where invisiable = 'Y' and id not in (select top " + pageSize*(pageNo-1) + " id from company where invisiable = 'Y' order by id) order by id 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询