I am using ms sql server, i have two tables below( table 1 and table 2):
table 1 table 2 result
name value ++ name data == name value data
test 10 test1 20 test 10 null
test1 null 20
I want to merge table 1 and table 2 and my expected result would be as result table , can anybody help me here ?
2条答案
按热度按时间uujelgoq1#
dkqlctbz2#
You can combine these using a full join:
If you want to use
*
to select all columns in the tables, SQL Server does not offer simple way to choose unique columns (without listing all columns). SQL Server doesn't supportUSING
.