日期:2014-05-17  浏览次数:20432 次

【SQL分页问题】点击下一页的时候查询不对
C# code
 string strsql = "select top "
                           + NUMCount + " * from tb_Student where  ID not in ( select top "
                           + number + " ID from tb_Student where fengcai=" + num + "  order by ID desc )and fengcai=" + num + " and email='" + shengfen + "' order by ID desc";


------解决方案--------------------
外层多了 and email='" + shengfen + "'