sql中去除重複的項

方法一:group by  (取最小的id)
select min(id) id,T from Table_1 group by T

方法二:union (不須要id)
select T from Table_1 where 1=0
union
select T from Table_1io

方法三:DISTINCTselect

select  DISTINCT T from Table_1nio

相關文章
相關標籤/搜索