如何使用 phpmyadmin 导出 MySQL 中的特定列?
我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
查询
或仅导出唯一记录:
然后单击底部给出的导出链接(在 phpmyadmin 中),
这对我来说是最简单的方法
Query
Or this to export unique records only:
Then click export link given on bottom (in phpmyadmin)
It is easiest way as per me
就我而言,我有一个包含 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
buttonSelect 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.After click on
browse
button scroll down the page and click onexport
button. which i mentioned in screen.Final step
select your export format and click on the go button... :)
Thank you for reading this. I hope you get the solution
您可以直接使用 phpmysql 执行此查询:
之后,您可以登录数据库服务器或使用 php 访问 OUTFILE
详细信息 - mysql 选择
You can execute this query directly using phpmysql :
After that, you can login to the database server OR use php to access the OUTFILE
details - mysql select
打开您只想导出特定列的表,单击结构,勾选该列的复选框,单击浏览按钮!
之后它会显示您的列数据,下面写着导出按钮,单击它!
不要点击顶部栏的导出按钮,
现在通过单击“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.
您可以执行如下查询:
SELECT web FROM table;
,然后将其导出。You could do a query like:
SELECT web FROM table;
and then just export that.输入
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.