mathew
mathew

Reputation: 369

How do I export particular column in MySQL using phpmyadmin?

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.

Upvotes: 36

Views: 61628

Answers (6)

Neeraj Tangariya
Neeraj Tangariya

Reputation: 1407

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

Upvotes: 26

Mohsin Shoukat
Mohsin Shoukat

Reputation: 1250

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.

Upvotes: 5

Kinjalk
Kinjalk

Reputation: 331

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

Upvotes: 33

jptsetung
jptsetung

Reputation: 9156

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.

Upvotes: 1

ajreal
ajreal

Reputation: 47321

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

Upvotes: 7

Sean
Sean

Reputation: 97

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

Upvotes: 2

Related Questions