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.
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".
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.
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? 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)
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With