select * from stuinfo where classid=4 显示5条数据
现在假设我每一页显示3条数据,sql语句如下:[b]select top 3 * from stuinfo where classid=4 and id not in
(select top (3*0) id from stuinfo)[/b] 0表示第一页 依次类推 改成1 发现数据重复 改成2 发现数据重复 请问该如何解决啊
我是个菜鸟 还望有大神解答
------解决方案--------------------
子查询中未加条件
select top 3 * from stuinfo where classid=4 and id not in
(select top (3*0) id from stuinfo where classid=4)