sql server - Joining multiple tables to one table -
i have table a, b, c, want join these table 1 table table has no linking field table b , table c. table b , table c has.
use union all, must name columns same though:
select cola1 [common_col1], cola2 [common_col2] union select colb1 [common_col1], colb2 [common_col2] b union select colc1 [common_col1], colc2 [common_col2] c order [common_col1]
Comments
Post a Comment