酷狗音乐电脑版网页:sql如何过滤查询重复数据
来源:百度文库 编辑:中科新闻网 时间:2024/05/12 00:51:21
如
select a1,b1 from a,b where a.id=b.id
要求 a1是不可以重复的,而不是整条数据不可以重复
select a1,b1 from a,b where a.id=b.id
要求 a1是不可以重复的,而不是整条数据不可以重复
加上一个distinct
select distinct a1,b1
from a,b
where a.id=b.id
select DISTINCT(a1),b1 from ..........