1. 批量更新 update table_name set field_name = CASE id WHEN id1 THEN field_value, WHEN id1 THEN field_value END 2.批量插入 insert into table_name (field1_name, field2_name) values(field1_value, field2_name) , (field1_value, field2_name)…
图所示现需要批量更新table2表内字段Pwd更新userName对IP地址username与Ip对应关系table1所示 update table2 set pwd=table1.ip from table1 inner join table2 on table1.username=table2.username UPDATE TABLE2 A SET A.PWD =(SELECT B.IP FROM TABLE1 B WHERE B.userName =A.userName)…