phpmyadmin:Mysql表A有两列:A_id int、A_name varchar和A_id int。表B有三列B_id int、B_name varchar和A_name varchar。现在我需要将表B更改为B_id int,B_name varchar,A_id int,其中A_id基于之前插入到表B中的A_name。我有上千行。
ee7vknir1#
UPDATE [table1_name] AS t1 INNER JOIN [table2_name] AS t2 ON t1.column1_name] = t2.[column1_name] SET t1.[column2_name] = t2.column2_name];
1条答案
按热度按时间ee7vknir1#