您的位置:首页 > 数据库

Excel生成sql脚本

2012-11-10 18:01 337 查看
使用concatenate:

CONCATENATE( text1, text2, ... text_n )
text1 to text_n are the strings that you wish to join together.

via:http://www.techonthenet.com/excel/formulas/concat.php

命令如下:

="insert into table_name(col1,col2) values('"&A2&"','"&B2&"');"

会生成一条sql语句,往下拉就会连续生成。

上面的&表示连接两个字符串,还可以用concatenate来做。

http://gubaojian.blog.163.com/blog/static/1661799082012213053694/

http://wangxiao5530.iteye.com/blog/1630604

枚举类型

excel

vlaue(x)将x提取成数字

或者相乘

=IF(A4*1>0,"a","b")
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: