欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

mysql的sql经典写法收录_MySQL

程序员文章站 2022-05-25 15:06:55
...
表关联更新:

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';

相关标签: 写法 经典