如何使用 phpmyadmin 导出 MySQL 中的特定列?

发布于 2024-10-09 00:12:35 字数 109 浏览 0 评论 0原文

我在 MySQL 数据库中有数千个网站列表和其他信息。

我只想将名为“web”的网站列导出到 Excel、文本或 csv。

我知道如何导出整个数据,但不知道如何导出特定列。

I do have thousands of website list and other info in MySQL database.

I want only website column named "web" to be exported to excel or text or csv.

I know how to export the whole data but dont know how to export particular column.

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

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

发布评论

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

评论(6

檐上三寸雪 2024-10-16 00:12:35

查询

SELECT `web` FROM `yourtablename` 

或仅导出唯一记录:

SELECT DISTINCT `web` FROM `yourtablename`

然后单击底部给出的导出链接(在 phpmyadmin 中),

这对我来说是最简单的方法

Query

SELECT `web` FROM `yourtablename` 

Or this to export unique records only:

SELECT DISTINCT `web` FROM `yourtablename`

Then click export link given on bottom (in phpmyadmin)

It is easiest way as per me

世界和平 2024-10-16 00:12:35

就我而言,我有一个包含 20k 条记录的用户表。然后我使用这种技术导出 20k 电子邮件地址。您不需要编写任何查询。

打开您的表 (user_login) 并单击结构按钮

在此处输入图像描述

选择要导出的列。就我而言,我需要电子邮件列,因此我选择了电子邮件列,然后单击浏览按钮。

输入图像描述这里

单击浏览按钮后,向下滚动页面并单击导出按钮。我在屏幕中提到过。

输入图像描述在这里

Final step

选择您的导出格式,然后单击“执行”按钮...:)
输入图像描述这里

感谢您阅读本文。我希望你能得到解决方案

In my case, I have a users table with 20k records. Then i export 20k email address using this technique. You don't need to write any query.

open your table (user_login) and click on the structure button

enter image description here

Select column which you want to export. In my case I need on email column so I selected the email column and then click on browse button.

enter image description here

After click on browse button scroll down the page and click on export button. which i mentioned in screen.

enter image description here

Final step

select your export format and click on the go button... :)
enter image description here

Thank you for reading this. I hope you get the solution

音盲 2024-10-16 00:12:35

您可以直接使用 phpmysql 执行此查询:

SELECT web FROM your_table INTO OUTFILE '/tmp/web.sql'

之后,您可以登录数据库服务器或使用 php 访问 OUTFILE

详细信息 - mysql 选择

You can execute this query directly using phpmysql :

SELECT web FROM your_table INTO OUTFILE '/tmp/web.sql'

After that, you can login to the database server OR use php to access the OUTFILE

details - mysql select

骄兵必败 2024-10-16 00:12:35

打开您只想导出特定列的表,单击结构,勾选该列的复选框,单击浏览按钮!
之后它会显示您的列数据,下面写着导出按钮,单击它!
不要点击顶部栏的导出按钮,
现在通过单击“go”按钮导出您的列。

open the table from which you want to export only certain column , click on structure , tick mark on check box of that column , click on browse button !
after that it will show you your column data , below their is written export button click on it !
don't click on export button which is at the top bar ,
now export your column by clicking on go Button.

晨敛清荷 2024-10-16 00:12:35

您可以执行如下查询:SELECT web FROM table;,然后将其导出。

You could do a query like:SELECT web FROM table; and then just export that.

对你再特殊 2024-10-16 00:12:35

输入SELECT web FROM table;,然后单击列表底部的“导出”按钮。重要的是,不要单击列表顶部的“导出”按钮,否则您将导出整个数据。

Enter SELECT web FROM table; and then click on the "Export" button that is at the bottom of the list. IMPORTANT, don't clic on the "Export" button at the top of the list, or you will export the whole data.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文