这段SQL表达式应该怎么写

[复制链接]
查看11 | 回复2 | 2008-11-29 18:34:38 | 显示全部楼层 |阅读模式
这是提取前6条数据的代码,如何把它改为提取从前面第3条开始以后的6条数据,也就是第3到第9条数据.急等高人指点!
sql="select top 6 id,topic from news where hidden=1and c_id=1 order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
id=rs("id")
topic=rs("topic")
response.write vbcrlf&"
[tr][td] [本地] "&joekoe_cms.code_html(topic,1,16)&"[/td][/tr]"
rs.movenext
loop
rs.close

回复

使用道具 举报

千问 | 2008-11-29 18:34:38 | 显示全部楼层
select * from (select *,(select count(*)+1 from news a where a.id=3 and m.idb<=9...
回复

使用道具 举报

千问 | 2008-11-29 18:34:38 | 显示全部楼层
select top 6 * from (select top 9 id,topic from news where hidden=1 and c_id=1 order by id desc) news1 order by id...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行