sql - How can A left outer join B return more rows than are in A? -
What is wrong about adding this simple SQL external?
Returns 25766, 1242 and 310176 respectively, the row (this is for Microsoft SQL Server 2012). Comparison of Left External Part B
Any time existing in A
Can return more rows, especially the Wayne diagram? I think I'm making a stupid mistake but what is this?
This can happen when the column is not unique in the b
table < Code> B . Suppose you have this data:
a b + --- --- --- --- | B | B C. + --- --- ++ --- --- + | 1 | | 2 | 1 | | 2 | | 2 | 2 | + --- --- --- --- ---
When you leave a
to b
column b Code>, you get
. + ----- + ------ + ------ + | A.B. | B.B. | B.C. + ----- + ------ + ------ + | 1 | Faucet Faucet | 2 | 2 | 1 | | 2 | 2 | 2 | Which is the only two rows in the + > b
Comments
Post a Comment