全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2728 0
2010-11-17
Given the SAS data sets:     

  WORK.ONE            WORK.TWO

  Id    Name          Id      Salary   
  —   ——        —     ——   
  112   Smith         243     150000   
  243   Wei           355      45000   
  457   Jones         523      75000   

  The following SAS program is submitted:

  data WORK.COMBINE;   
     merge WORK.ONE WORK.TWO;  
     by Id;  
  run;

  Which SQL procedure statement produces
  the same results?   
A.
create table WORK.COMBINE as   
select
   Id,
   Name,     
   Salary   
from  
   WORK.ONE  
   full join
   WORK.TWO  
on ONE.Id=TWO.Id
;     

     B.
create table WORK.COMBINE as   
select
   coalesce(ONE.Id, TWO.Id) as Id,      
   Name,     
   Salary   
from  
   WORK.ONE,
   WORK.TWO  
where ONE.Id=TWO.Id   
;     

     C.
create table WORK.COMBINE as   
select
   coalesce(ONE.Id, TWO.Id) as Id,      
   Name,     
   Salary   
from  
   WORK.ONE  
   full join
   WORK.TWO  
on ONE.Id=TWO.Id
order by Id  
;     

     D.
create table WORK.COMBINE as   
select
   coalesce(ONE.Id, TWO.Id) as Id,      
   Name,     
   Salary   
from  
   WORK.ONE,
   WORK.TWO  
where ONE.Id=TWO.Id   
order by ONE.Id
;
答案及详细解答请参见:http://crackman.net/?p=424
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群