请问这个小功能怎么编写(asp)
select top 10 * from "& ab &" where flag=1 order by info_id desc
这句话是选择了前10个记录
我现在想选择11~20这些记录,请问怎样编写
参考答案:用以下语句:
select top 10 * from 表名 where flag=1 and info_id not in
(SELECT top 10 info_id From 表名 where flag=1 Order By info_id ) Order By info_id
用字符串分解一下就是:
SQL="select top 10 * from " & ab & " where flag=1 and info_id not in
(SELECT top 10 info_id From " & ab & " where flag=1 Order By info_id ) Order By info_id"