皮秒洗纹身有疤痕吗:sql如何过滤查询重复数据

来源:百度文库 编辑:高考问答 时间:2024/04/29 19:32:49

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