如何在join语句中从sql中选择多个变量?

时间:2014-02-13 19:47:48

标签: sql sas

proc sql noprint;
    create table Final as
    select a.*, b.(more than one variable)
    from Table as a left join cool as b
    on a.xx = b.yy
    ;
quit;

2 个答案:

答案 0 :(得分:4)

只需列出它们:

select a.*, b.column1, b.column2, b.column3...

答案 1 :(得分:0)

proc sql noprint;
    create table Final as
    select a.*, b.variable1, b.variable2, [...], b.variableN
    from Table as a left join cool as b
    on a.xx = b.yy
    ;
quit;

您可以获得有关SAS文档的更多信息。