读书人

SQL语句显示前面8条?解决办法

发布时间: 2012-02-10 21:27:41 作者: rapoo

SQL语句——显示前面8条?
select b.* from proDD as a,product as b where a.productNO = b.ID order by a.orderby desc

只取前面8条记录,在select后加top 8怎么没反应?

[解决办法]
by a.orderby 是这样吗,你检查语法了没有啊
[解决办法]
…… order by a.orderby desc,a.productNO desc
如果orderby里有N条相同且并列第8,就都算上了。
[解决办法]
select top 8 b.* from proDD as a,product as b where a.productNO = b.ID order by a.orderby desc

读书人网 >ASP

热点推荐