I am using MS SQL.
I have the following tables:
table A: id1 data1 8234 ko 2 po 333 koo 40 woo table B: id2 data2 123 meow 654 frrr table C: id3 data3 10 a 20 b 30 c 40 d 50 e 60 f
I want to get the following:
id1 data1 id2 data2 id3 data3 8234 ko 123 meow 10 a 2 po 654 frrr 20 b 333 koo NULL NULL 30 c 40 woo NULL NULL 40 d NULL NULL NULL NULL 50 e NULL NULL NULL NULL 60 f
It seems the full amount of the tables without any conditions. I just want to get all columns and all data from all tables, as is.
How to do it? UPD: tables are not related.
In the case where the tables are related to each other: I would use the LEFT or RIGHT JOINT when it was known in advance which table is larger. But this is unknown.
source share