從一個表中拿某列設置到另一個表中,通過外鍵關聯。

update mypay_account_base set ab_ub_name_v = (
  select ub_name_v from mypay_user_base 
  where ab_ub_id_n=ub_id_n
) where exists (
  select 1 from mypay_user_base
  where ab_ub_id_n=ub_id_n
) and ab_ub_type_c='bkof';

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章