日期:2014-05-18 浏览次数:20536 次
SELECT * FROM tb AS A WHERE editno = (SELECT MAX(editno) FROM tb WHERE A.id=id)
------解决方案--------------------
SELECT * FROM TB T WHERE NOT EXISTS(SELECT 1 FROM TB WHERE ID=T.ID AND editno>T.editno)
------解决方案--------------------
select *
from ta a
where not exists(select 1 from ta where id = a.id and editno > a.editno)
------解决方案--------------------
select tb.* from tb join (select id,max(editno) editno from tb) a on tb.id=a.id and tb.editno=a.editno