从Excel生成sql语句

在Excel中使用公式:CONCATENATE来生成sql更新语句:
在这里插入图片描述使用公式:=CONCATENATE(update device set roomid=1 where description=’”&L2&"’ and devicetypeid=99;")
要注意不要漏两个"和&符号,即可生成表中需要的update更新语句。

猜你喜欢

转载自blog.csdn.net/rosejeck/article/details/83027340