Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 450
mathew Avatar asked Dec 20 '10 03:12

mathew


People also ask

How do I export a single column in MySQL?

You can do it very easily using MySQL GUI tools like SQLyog, PHPMyAdmin. In SQLyog you just need to select the table, Click on "Export As..." Icon and you will get dialog to select the columns that you want to Export. Then click on "Export Button".

How do I export a column?

Select Miscellaneous > File Export > General or Configuration > External > Export Files to access the Export File List screen. Select the export from the list and select the Edit button to access the Export File Details screen. Select the Export Columns button. The Export Column Details screen appears.

How do I export my database from phpMyAdmin?

phpMyAdmin has two export options: Quick and Custom. If you’re not familiar with SQL tables or want the simplest way to export your database, you can select the Quick option.

How to export specific column data in MySQL?

How to export specific column data in MySQL? select yourColumnName from yourTableName into outfile 'yourLocationOfFile’; mysql> create table DemoTable ( StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, StudentFirstName varchar (20), StudentLastName varchar (20) ); Query OK, 0 rows affected (0.54 sec)

What is the maximum database size that phpMyAdmin can import?

Note: phpMyAdmin can only import databases up to 50 MB in size. If your database is larger you will need to use SSH instead of phpMyAdmin. See Managing Databases with Command Line for further instructions.

What is phpMyAdmin and how to use it?

phpMyAdmin is one of the most popular tools used to administrate MySQL databases. This free and open-source tool has a user-friendly interface that allows you to run MySQL queries and manage your databases easily, including but not limited to exporting them. Most web hosting providers add phpMyAdmin to their control panel.


1 Answers

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

like image 107
Kinjalk Avatar answered Oct 09 '22 11:10

Kinjalk