mysql - Updating Values of a Column from one Table to another -


i have 2 tables:-

source table: act_dt columns (cust_name, acc_type, cust_stat, sb_act_dt);

target table: org_dt columns (cust_name, acc_type, cust_stat, sb_act_dt);

the column sb_act_dt in target table has null values. need update column values of same column in source table. condition checked are:

acc_type='billing' , cust_stat='active'.   

the target table has updated if above conditions found true.

how can it? appreciated.

what looking update table using join

update org_dt o join act_dt on o.cust_name=a.cust_name    ,   o.acc_type=a.acc_type    ,   o.cust_stat=a.cust_stat    set o.sb_act_dt = a.sb_act_dt a.acc_type='billing' , a.cust_stat='active' 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -