将CSV文件动态导入MySQL工作台到新表中 [英] Import a CSV file into MySQL workbench into a new table dynamically

查看:137
本文介绍了将CSV文件动态导入MySQL工作台到新表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用Load data infile将CSV文件数据导入MySQL Workbench中的现有表中,但是如果我有一个25列的文件,那么在导入之前为此类表创建结构会很麻烦.

I can import a CSV file data into a existing table in MySQL Workbench, using Load data infile , but what if I have a file with 25 columns, it becomes a pain to create a structure for such tables before importing.

是否可以在不创建结构的情况下导入CSV文件,例如SAS中的proc导入?

Is there a way to import CSV files without creating the structure, like proc import in SAS?

推荐答案

是的.尝试新的6.3版本(当前在RC中,即将成为GA),该版本带有支持CSV和JSON数据的新表数据导入/导出功能.导入过程中它会动态创建表.

Yes, there is. Try the new 6.3 release (currently in RC, soon to be GA) which comes with a new table data import/export feature that supports CSV and JSON data. It creates the table on the fly during import.

这篇关于将CSV文件动态导入MySQL工作台到新表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆