2011年7月9日

从每个分类选择10条记录

摘要: 下面是从每个分类读取10条记录的代码,非常的不错。不过性能就一般化了。从每个分类选择10条记录复制代码代码如下:select a.* from Content a where a.log_ID in (select top 10 log_ID from Content where log_CateID = a.log_CateID order by log_ID desc) order by log_ID desc"注意Content 是新闻记录表log_CateID 是分类字段log_ID 关键字字段,自动增加的 阅读全文

posted @ 2011-07-09 20:43 滴d 阅读(248) 评论(0) 推荐(0) 编辑

导航