Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

using left join and counting number of rows that are in table 1 and appear in table 2, including the ones that don't appear in table 2

$
0
0

I have 2 tables, suppose they are t1(1,2,3,4,5) and t2(1,1,2,2,3,5,6), I want to show that items in t1 exist in t2 then count the number of appearances in t2 such that I end up having (1=2,2=2,3=1,4=0,5=1)


Viewing all articles
Browse latest Browse all 8428

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>