Sql查询过滤重复的数据

select CustCode,* from solist a where not exists
(select 1 from SOList(nolock) left join so(nolock) on solist.soid=so.SOID where a.ConfirmDate>solist.ConfirmDate )

猜你喜欢

转载自www.cnblogs.com/wwwlzp/p/8974938.html