日期:2014-05-17 浏览次数:20513 次
select * from tb a
where a.reviewdate=(select max(reviewdate) from tb where refno=a.refno)
SELECT * FROM TB a WHERE reviewdate=(SELECT MAX(reviewdate) FROM TB WHERE refno=a.refno)
select * from tb as a
where not exists(select 1 from tb as x where x.refno=a.refno and x.reviewdate>a.reviewdate)
select * from [Table] T where T.reviewdate =
(select max(reviewdate) from [Table] where refno = T.refno)