Sql 两个不同表上的DISTINCT关键字';内容
我们可以在完全外部联接创建的两个不同表的内容上使用DISTINCT关键字吗?是的,甚至可以在三个表上使用DISTINCT关键字:Sql 两个不同表上的DISTINCT关键字';内容,sql,sql-server,Sql,Sql Server,我们可以在完全外部联接创建的两个不同表的内容上使用DISTINCT关键字吗?是的,甚至可以在三个表上使用DISTINCT关键字: select distinct t1.id, t2.col1, t3.col1 from table1 t1 full outer join table2 t2 on t1.id = t2.t1_id full outer join table3 t3 on t1.id = t3.t1_id 是的,您可以使
select distinct t1.id, t2.col1, t3.col1
from table1 t1
full outer join
table2 t2
on t1.id = t2.t1_id
full outer join
table3 t3
on t1.id = t3.t1_id
是的,您可以使用DISTINCT,只需从结果集中删除任何重复项。