SQL中三种去重方法
目录
rowid
group by
distinct
select * from emp1
where rowid not in
(select min(rowid) from emp1)
group by 不仅有分组的功能,同时也可以用于去重,
select * from emp1 group by (#对所有字段进行分组)
distinct的使用直接接在select后面即可
select distinct (#查询字段) from emp1