首頁  >  文章  >  資料庫  >  mysql的sql经典写法收录_MySQL

mysql的sql经典写法收录_MySQL

WBOY
WBOY原創
2016-05-27 13:46:211039瀏覽

表关联更新:

 

UPDATE user_bank a INNER JOIN bank AS b

ON a.bank_code = b.bank_code

SET a.bank_type =b.id WHERE a.bank_type IS NULL AND a.id=1650;

 

更新前的查询:

 

select * from user_bank where id = 1650;

select * from user_bank where bank_type is null;

select count(*) from user_bank where bank_type is null;

select * from bank;

select * from bank where bank_code = '03010000';

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn