[英]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.