Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sridata
Starting Member
3 Posts |
Posted - 2015-01-31 : 06:56:36
|
I have a small doubt regarding cross join and NULL values,please help if someone can..Table A has four rows (1,2,3,NULL)..Table B has 4 rows(1,2,3,NULL)..if i cross join table A and B..how many rows will be there in result |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2015-01-31 : 07:05:50
|
try it! |
|
|
sridata
Starting Member
3 Posts |
Posted - 2015-01-31 : 07:24:32
|
no sql server instance here so not able to do..can u plz try and tell me..is there any cloud sql instance there |
|
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2015-01-31 : 09:35:28
|
just install sql server express.even better, if you've got 50 bucks, get a copy of Sql Server Developer. |
|
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2015-01-31 : 09:38:32
|
fyi:with tablea(n) as (select 1 union select 2 union select 3 union select null),tableb(n) as (select 1 union select 2 union select 3 union select null)select * from tableacross join tableb produces 16 rows, as expected. Cross join doesn't look at the data, It's just a cartesian product . 4 x 4 = 16, IIRC |
|
|
sridata
Starting Member
3 Posts |
Posted - 2015-02-01 : 00:20:27
|
thanks a lot |
|
|
|
|
|
|
|