根据来自 phpMyAdmin 的 MySQL 查询生成 CSV

2022-01-05 00:00:00 csv mysql phpmyadmin

我可以根据 MySQL 查询从 phpMyAdmin 生成 CSV 文件吗?

Can I generate a CSV file from phpMyAdmin based on a MySQL query?

例如,假设我查询了一个表以返回图像"一词的结果.然后我可以生成一个包含图像"一词的所有记录的 CSV 文件吗?

For example, let's say I queried a table to return results for the word "image". Could I then produce a CSV with all of the records containing the word "image"?

推荐答案

在 PhpMyAdmin 中,进入 SQL 选项卡并在其中输入您的查询.点击开始,然后点击结果底部的Export.您可以选择导出为 CSV.

In PhpMyAdmin, go into the SQL tab and enter your query in there. Hit go, then click Export at the bottom of your results. You can select to export as a CSV.

如果您有兴趣,这里是如何在没有 PMA 的情况下通过 SQL 进行操作:如何以CSV格式输出MySQL查询结果?

In case you're interested, here's how to do it via SQL without PMA: How to output MySQL query results in CSV format?

相关文章