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
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