+ -
当前位置:首页 → 问答吧 → access数据库查询问题

access数据库查询问题

时间:2011-09-02

来源:互联网

查询表中的前6条数据可以用“select top 6 * from 表”,如果要查询2-6条数据呢,怎么写?
我想在网站首页显示前6条新闻,但是第一条除了显示标题外还想显示一部分新闻的内容,所以我想先读取第一条新闻,显示标题和部分内容,然后再读取2-6条,只显示标题

作者: liuying1982000   发布时间: 2011-09-02

select top 5 * from 表 where id not in(select top 1 id from 表 order by id desc) order by id desc

作者: calmcrime   发布时间: 2011-09-02

热门下载

更多