SQL/MySQL/Backup Load/Export

Материал из SQL эксперт
Перейти к: навигация, поиск

Exporting from MySQL

  
USE <database_name>;
SELECT *
INTO OUTFILE "<file_name.txt>"
FROM <table_name>;



Exporting from MySQL indicating "," terminator

  
USE <database_name>;
SELECT *
INTO OUTFILE "<file_name.csv>"
FIELD TERMINATED BY ","
FROM <table_name>;



Exporting from MySQL indicating the terminator

  
USE <database_name>;
SELECT *
INTO OUTFILE "<file_name.txt>"
FIELD TERMINATED BY ""
FROM <table_name>;