UPDATE ~ SELECT 문 DB/MS-SQL 2012/01/16 17:57

date distribute 
   set right_pv = b
 where userid in (select userid from b)

 

update distribute_cp_temp
   set (parents_id, recomm_id) = (select SPONSORID, INTRODUCORID
                    from dist2 
     where DISTRIBUTORID = distribute_cp_temp.userid);

 

update ddd
   set cyberpoint = (select cybermoney
                         from d
                 where DISTRIBUTORID = ddd.userid);

 

update distribute_cp_temp
   set (parents_name) = (select name
                    from d 
     where DISTRIBUTORID = distribute_cp_temp.userid
       and url is not null);

 
 

update 상품 a
set a.판매개시일 =
                 (select b.판매개시일
                    from tmp_상품판매개시일 b
                   where a.상품코드= b.상품코드
                   )
where a.상품코드 in(select 상품코드 from tmp_상품판매개시일)

 

UPDATE 부점 A
  SET A.영문부점명 = (SELECT 영문부점명
                    FROM 영문부점명 B
                  WHERE A.부점 = B.부점 
                  )
  WHERE EXISTS (SELECT 영문부점명
                    FROM 영문부점명 B
                  WHERE A.부점 = B.부점                      
                )

1 ... 4 5 6 7 8 9 10 11 12 ... 48