旧电瓶翻新:sql如何过滤查询重复数据

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/24 01:49:16

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 ..........