How to export a single table from phpmyadmin to a comma delimited text file?

I need to export a table from phpmyadmin to a comma delimited text file. I think there is code, but he cannot find it. I found one, but it does not work.

I need to export this table because I need to sort and sort it and add another column to add data to this column.

How can i do this?

+3
source share
4 answers

PHPAdmin, , "". , (), , . CSV,.zip,.gzip ..

+10

"". . CSV .

+3

:

SELECT * FROM `table_name`
 INTO OUTFILE 'directory' ->e.g /tmp/myTable.csv(Linux) or C:\myTable.csv(Windows)
 FIELDS TERMINATED BY ','
 ENCLOSED BY '"'
 LINES TERMINATED BY '\n'
+3

, . , :

Go to View or write your SQL question
In the bottom of the view-page you will have a Export link. 
If you click on that you will now export the question (and its order) 
in any format you chose
+2

Source: https://habr.com/ru/post/1723977/


All Articles