将excel表导入数据库的方法步骤
时间:2023-08-05 15:02:21
在Excel中录入好数据以后,可能会有导入数据库的需求,这个时候就需要利用一些技巧导入。接下来是小编为大家带来的如何将excel表导入数据库的方法,希望对你有用。
将excel表导入数据库的方法
Excel导入数据库步骤1:对于把大量数据存放到数据库中,最好是用图形化数据库管理工具,可是如果没有了工具,只能执行命令的话这会是很费时间的事。那我们只能对数据进行组合,把数据组成insert语句然后在命令行中批量直行即可。
Excel导入数据库步骤2:我们对下面数据进行组合,这用到excel中的一个功能。
在excel中有个fx的输入框,在这里把组好的字符串填上去就好了。
注:字符串1 & A2 &字符串2 & …
A2可以直接输入,也可以用鼠标点对应的单元格。
Excel导入数据库步骤3:每个字符串之间用 & 符号进行连接。下面是第一条连接字符串
="insert into tavern values('"&A2&"','"&B2&"','"&C2&"','"&D2&"');"
写好后按回车键Enter就能组合出对应的字符串了。
insert into tavern values('jw_agi','曙光','0','1');
Excel导入数据库步骤4:组好第一行的字符串后,把鼠标放到单元格右下方,出现加粗的十字,单击按下(别松开),一直往下拉,直到最后一行再放开就行了。
5这样我们就把insert语句都整理好了,接下来就是大家把这些语句批量执行就可以了。
标签:字符串,导入,数据库,方法,Excel教程
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
win10邮件添加账户没有反应的解决方法
2023-10-09 13:59:12
![](https://img.aspxhome.com/file/2023/4/a303940_0s.jpg)
安装错误0x800f0988怎么解决?(图文教程)
2023-02-03 10:28:13
![](https://img.aspxhome.com/file/2023/30/a267304_0s.jpg)
5e对战平台怎么解锁天梯匹配资格?
2023-08-25 15:47:37
![](https://img.aspxhome.com/file/2023/2/a283947_0s.jpg)
教你利用powershell找回Win10应用商店
2022-11-01 00:43:34
![](https://img.aspxhome.com/file/2023/2/a289228_0s.png)
Cpu不兼容怎么升级win11
2022-09-28 20:55:20
![](https://img.aspxhome.com/file/2023/27/a237333_0s.png)
Win10创造者更新15014电脑版升级卡在0%了怎么解决
2022-08-15 17:10:32
![](https://img.aspxhome.com/file/2023/28/a242722_0s.jpg)
Win7系统网络未连接、连接不可用如何解决?
2022-12-17 22:02:41
![](https://img.aspxhome.com/file/2023/27/a232108_0s.jpg)
Win10系统玩绝地求生游戏网络延迟很高的解决方法
2023-01-27 19:10:17
![](https://img.aspxhome.com/file/2023/2/a291565_0s.jpg)
win10系统怎么待机?win10系统不能待机的解决方法
2023-02-20 04:31:33
![](https://img.aspxhome.com/file/2023/3/a293758_0s.jpg)
Win10怎么进入安全模式?Win10怎么退出安全模式?
2023-12-14 05:20:22
![](https://img.aspxhome.com/file/2023/7/51777_0s.jpg)
Win10笔记本外接显示器选仅第二屏幕出现卡顿掉帧如何解决?
2023-12-07 10:31:44
![](https://img.aspxhome.com/file/2023/26/a223707_0s.jpg)
msvcp140.dll文件怎么安装_msvcp140.dll文件安装方法
2022-02-20 18:33:17
![](https://img.aspxhome.com/file/2023/4/a307557_0s.jpg)
轻松筹APP怎么查看项目验证结果?轻松筹APP查看项目验证结果的方法
2022-12-25 14:56:00
![](https://img.aspxhome.com/file/2023/8/a335189_0s.jpg)
excel表格建立目录索引的方法
2022-04-15 11:37:01
excel怎么设置网格线颜色?
2023-06-30 05:06:15
![](https://img.aspxhome.com/file/2023/2/41202_0s.jpg)
电脑屏幕整体放大了怎么缩小
2022-12-11 07:21:51
![](https://img.aspxhome.com/file/2023/9/a343161_0s.jpg)
Win10字体文件夹拒绝访问怎么办?
2023-11-15 02:38:13
![](https://img.aspxhome.com/file/2023/5/49435_0s.png)
win10底部任务栏无响应是什么原因?
2023-01-30 08:09:06
![](https://img.aspxhome.com/file/2023/30/a271021_0s.jpg)
Win11鼠标漂移怎么办?Win11鼠标漂移解决方法
2022-04-03 23:21:56
![](https://img.aspxhome.com/file/2023/27/a236542_0s.jpg)
东莞证券财富通版通达信怎么使用?
2022-04-10 11:29:12
![](https://img.aspxhome.com/file/2023/7/a332458_0s.jpg)