当前位置:Gxlcms > 数据库问题 > sql中去除重复的项

sql中去除重复的项

时间:2021-07-01 10:21:17 帮助过:2人阅读

方法一: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

sql中去除重复的项

标签:

人气教程排行