楼主: fyp198744
3836 10

merge用sql内连接如何实现? [推广有奖]

11
dengwei715 发表于 2016-8-3 16:18:57
fyp198744 发表于 2016-8-3 09:19
或许这样写更规范,但是依然出不来merge的那种效果!
data test3;
        merge test1 test2;
                by SOC_TXT PT_TXT AEVGRD1C;
run;
等价于 full join
data test3;
        merge test1(in=a) test2(in=b);
                by SOC_TXT PT_TXT AEVGRD1C;
            if a;
run; 等价于 left join

data test3;
        merge test1(in=a) test2(in=b);
                by SOC_TXT PT_TXT AEVGRD1C;
            if a and b;
run; 等价于 inner join

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-29 06:13