mysql通過關聯修改表中兩個字段的值
Sql代碼
update A set a_field=
(select realname from B where A.extension=B.extension and B.extension <> '')
update A a inner join B b on a.extension=b.extension and a.extension <> ''
set a.extenrealname =b.realname