最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Table A values not in Table B AND Table B value not in Table A, then union the results in BigQuery - Stack Overflow

programmeradmin6浏览0评论

Table A Table B 1111 1111 2222 4444 3333

Result 1 In A but not in B = 2222,3333 Result 2 In B but not in A = 4444

I need to tag/identify the difference scenarios e.g. adding a column for results 1=extra/2=missing

I'm using this and because it runs all at once I can't identify the different scenarios. SELECT * FROM A AS A WHERE CONCAT(A.c1,A.c2) NOT IN (SELECT CONCAT(B.b1,b.e) FROM B);

How can I separate the SQL to get what I need to identify the extra vs missing values

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论