Is any difference between the union of all relevant and external alliances consistent?

Can someone check my understanding of proc sql union transactions? My interpretation of the differences between external union and union is as follows:

  • Union removes duplicate rows, and outer union doesn't

  • The union will overlap the columns, but there will be no external union by default.

So, will there be any difference between the union of all relevant and external associations? It seems like EVERYTHING would remove the first difference, and CORRESPONDING would remove the second difference, but I think there might be an extra difference between the two that I don't see.

+3
source share
2 answers

, : , . Outer Union Corresponding , , . Union All Corresponding , .

+2

, OUTER UNION UNION ALL , . CORR , ; OUTER UNION , , UNION ALL , ( ) . CORR .

:

:

proc sql;
select height, weight from sashelp.class
union all 
select weight,height from sashelp.class;
select height, weight from sashelp.class
outer union
select height, weight from sashelp.class;
quit;

Stacking:

proc sql;
select height, weight from sashelp.class
union all corr
select weight,height from sashelp.class;
select height, weight from sashelp.class
outer union corr
select height, weight from sashelp.class;
quit;

SAS .

+2

All Articles