摘要: 表:T字段:id自动递增,field1数字,.....select*from(select*,(selectcount(*)fromTast2wheret2.field1=t1.field1andt2.id<=t1.id)asaaafromTast1)ast3whereaaa<=2t2.field1=t1.field1是分组的条件,可自由添加参考地址:http://topic.csdn.net/t/20040819/17/3291042.html 取出数据中每个分类前5条selectID,title,D_Picture,addtime,newstypeid,jj,contentFR 阅读全文
posted @ 2011-09-14 16:00 Rex.He 阅读(701) 评论(0) 推荐(0) 编辑