转自:https://blog.csdn.net/qq_21260033/article/details/78974474?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-3.essearch_pc&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-3.essearch_pc
1 使用excel批量做插入sql:
1.1 整理好数据
1.2 在D1单元格输入sql (=”insert into table1(name,sex,studentId) values(‘”&A1&”’,’”&B1&”’,’”&C1&”’)”) 然后退拽D1右下角至最后一行
2 使用excel批量更新sql:
使用如上
更新sql:
="update ZTO_TRANSFER_CENTER set SITE_CATEGORY = \'"&D2&"\' where CENTER_NAME=\'"&A2&"\' and TRANSFER_NAME=\'"&B2&"\' and DELETIONSTATECODE = 0"