ASP数据调用的问题

来源:百度知道 编辑:UC知道 时间:2024/05/15 12:46:24
例如我的数据库有10条新闻..10条新闻的字段参数都一样~~
我想按顺序调用第2-10条的新闻.应该如何调用~~

记得不是倒序哦,是顺序哦.就是说不调用第一条新闻!

请给出代码~~

先把记录集指针指向第一条记录,然后再用movenext移到第二条.再写循环输入不就行了

新闻再怎么样总应该会有个自动增长的ID是吧?
select top 9 * from [table_name] where id <> (select top 1 id from [table_name] order by id) order by id

这样选出来的就是除第一条外,紧接第一条的9条记录。

rs.open
if rs.recordcount>1 then rs.move 2'移动指针到第二条记录
这样就可以了。

select top 9 from [table] where id >all(select top 1 id from [table] order by id asc>) order by id asc还是比较快的,

同意