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_1

方法三:DISTINCT

select  DISTINCT T from Table_1

posted @ 2015-12-31 09:33  eyye的眼睛  阅读(253)  评论(0编辑  收藏  举报