我正在尝试更新table1与table2列"sc"这是我的
table1
<表类>
CP
tbody><<tr>刺 德瑞德。 sab 表类>
你能试试这个吗?
update table1 set table1.cp = source.sc
from (select * from table2 where cp <> sc ) source
where table1.cp = source.cp;
select * from table1;
+-----------+
| CP |
+-----------+
| stab |
| crawl.com |
| dredal |
| sab |
+-----------+