There are 5 columns of data in excel, which are序号,编号,姓名,昵称,邮箱
I want to splice it into a database statement as follows:
update users set `uid`=2,`name`="张三",`r_name`="李四",`email`="[email protected]" where id=1;
The update statement can be automatically generated by entering the following function next to it.
=CONCATENATE("update users set `uid`="&B2&",`name`="""&C2&""",`r_name`="""&D2&""",`email`="""&E2&""" where id="&A2&";")
The same applies to other statements, such as the insert statement:
=CONCATENATE("insert into users(`uid`,`name`,`r_name`,`email`) values("""&B3&""","""&C3&""","""&D3&""","""&E3&""");")