[英]how to compare two tables having different number of columns in sql
select *
from table2
where new_source in
(select source from table1
minus
select new_source from table2);
嗯。 . . 不清楚id
來自哪里。 所以,我在想:
select listagg(source, ',') within group (order by source), 10 as id
from table1 t1
where not exists (select 1
from table2 t2
where t2.source = t1.source and t2.source = 10
);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.