日期:2014-05-17 浏览次数:20533 次
DECLARE @TB1 TABLE(A INT,B INT) INSERT @TB1 SELECT 1,2 UNION ALL SELECT 1,3 DECLARE @TB2 TABLE(A INT,B INT) INSERT @TB2 SELECT 1,2 SELECT * FROM @TB1 T1 INNER JOIN @TB2 T2 ON T1.A=T2.A and t1.b=t2.b SELECT * FROM @TB1 T1 full outer JOIN @TB2 T2 ON T1.A=T2.A and t1.b=t2.b (所影响的行数为 2 行) (所影响的行数为 1 行) A B A B ----------- ----------- ----------- ----------- 1 2 1 2 (所影响的行数为 1 行) A B A B ----------- ----------- ----------- ----------- 1 2 1 2 1 3 NULL NULL (所影响的行数为 2 行)