How do I export particular column in MySQL using phpmyadmin?

前端 未结 5 1675
有刺的猬
有刺的猬 2020-12-29 21:13

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

相关标签:
5条回答
  • 2020-12-29 21:57

    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.

    0 讨论(0)
  • 2020-12-29 22:03

    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

    0 讨论(0)
  • 2020-12-29 22:09

    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.

    0 讨论(0)
  • 2020-12-29 22:10

    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

    0 讨论(0)
  • 2020-12-29 22:10

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

    0 讨论(0)
提交回复
热议问题