mysql的sql經典寫法收錄_MySQL
來源:懂視網
責編:小采
時間:2020-11-09 20:15:03
mysql的sql經典寫法收錄_MySQL
mysql的sql經典寫法收錄_MySQL:表關聯更新: 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
導讀mysql的sql經典寫法收錄_MySQL:表關聯更新: 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

表關聯更新:
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';
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com
mysql的sql經典寫法收錄_MySQL
mysql的sql經典寫法收錄_MySQL:表關聯更新: 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