如何将单个表从 phpmyadmin 导出到逗号分隔的文本文件?

发布于 2024-08-12 10:29:07 字数 138 浏览 5 评论 0原文

我需要将表从 phpmyadmin 导出到逗号分隔的文本文件。我认为有一个代码,但似乎找不到它。我找到了一个,但它不起作用。

我需要导出此表,因为我需要对其进行组织和排序并添加另一列,以便我可以将数据添加到此列。

请问我该怎么做?

I need to export a table from phpmyadmin to a comma delimited text file. I think there is a code but can't seem to find it. I found one but it doesnt work.

I need to export this table because I need to organize it and sort it and add another column so I can add data to this column.

How can I do this please?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

不醒的梦 2024-08-19 10:29:07

在 PHPAdmin 中,如果我没记错的话,有一个“导出”选项卡。如果单击该按钮,您可以选择要导出的表以及导出数据的格式。CSV、.zip、.gzip 等...

In PHPAdmin, if I recall correctly, there is an Export tab. If you click on that, you can select the table(s) you want to export and which format you would like to export the data in. CSV, .zip, .gzip, etc...

内心荒芜 2024-08-19 10:29:07

执行这条语句:

SELECT * FROM `table_name`
 INTO OUTFILE 'directory' ->e.g /tmp/myTable.csv(Linux) or C:\myTable.csv(Windows)
 FIELDS TERMINATED BY ','
 ENCLOSED BY '"'
 LINES TERMINATED BY '\n'

Execute this statement:

SELECT * FROM `table_name`
 INTO OUTFILE 'directory' ->e.g /tmp/myTable.csv(Linux) or C:\myTable.csv(Windows)
 FIELDS TERMINATED BY ','
 ENCLOSED BY '"'
 LINES TERMINATED BY '\n'
红墙和绿瓦 2024-08-19 10:29:07

选择数据库并单击“导出”选项卡。选择要导出的表。使用 CSV 作为格式。

Select the database and click the 'Export' tab. Select the table to export. Use CSV as the format.

我要还你自由 2024-08-19 10:29:07

正如之前提到的,您有一个用于执行操作的导出选项卡。但是,如果您想导出一个棘手的问题或非常特殊的订单,您可以执行以下操作:

Go to View or write your SQL question
In the bottom of the view-page you will have a Export link. 
If you click on that you will now export the question (and its order) 
in any format you chose

As mention before you have a export tab for do things things. But if you want to export a tricky question or a very special ordering you can do as following:

Go to View or write your SQL question
In the bottom of the view-page you will have a Export link. 
If you click on that you will now export the question (and its order) 
in any format you chose
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文