sql语句汇总

1:依某字段分组取最大记录值的所有数据
select * from  Attachment a ,(select max(edition) edition,docno from Attachment group by docno) b where a.edition=b.edition and a.docno=b.docno order by filename,uploadtime
posted on 2008-01-30 15:28  heart-in-sky  阅读(112)  评论(0编辑  收藏  举报