您的位置:首页 > 其它

根据字段去重查询所有数据

2015-06-08 12:24 323 查看
select distinct aa,* from TableInfo

where ID in (select MAX(ID) from TableInfogroup by aa)

select top 5 * from CH_PlanInfo left join CH_PlanTypeInfo on CH_PlanInfo.PlanTypeID=CH_PlanTypeInfo.PlanTypeID

where PlanID in (select MAX(PlanID) from CH_PlanInfo group by PlanCard)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: