mysql into outfile with headers

Solutions on MaxInterview for mysql into outfile with headers by the best coders in the world

showing results for - "mysql into outfile with headers"
Bailey
04 Mar 2020
1SELECT * FROM (
2    SELECT 'username','email'
3    UNION ALL
4    (
5        SELECT `username`,`email`,`steam_id` FROM `users` WHERE `userna` LIKE '%@temp%'
6    )
7) resulting_set
8INTO OUTFILE '/results/result.txt' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n';