Answers for "how to export data with column headers in mysql server"

SQL
0

mysql into outfile with headers

SELECT * FROM (
    SELECT 'username','email'
    UNION ALL
    (
        SELECT `username`,`email`,`steam_id` FROM `users` WHERE `userna` LIKE '%@temp%'
    )
) resulting_set
INTO OUTFILE '/results/result.txt' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY 'n';
Posted by: Guest on June-02-2020
-1

export mysql table to file

mysqldump db_name tbl_name;
Posted by: Guest on July-01-2020

Code answers related to "how to export data with column headers in mysql server"

Code answers related to "SQL"

Browse Popular Code Answers by Language