| Bug #50612 | SELECT ... INTO OUTFILE should support writing column name headers | ||
|---|---|---|---|
| Submitted: | 26 Jan 2010 2:00 | Modified: | 26 Jan 2010 8:32 |
| Reporter: | Justin Swanhart | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | MySQL Server: DML | Severity: | S4 (Feature request) |
| Version: | OS: | Any | |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | LOAD DATA INFILE, select into outfile | ||
[26 Jan 2010 8:15]
MySQL Verification Team
looks like bug #34992
[26 Jan 2010 8:32]
Valeriy Kravchuk
Duplicate of Bug #34992.

Description: It should be possible to write the column names into a text file exported with SELECT .. INTO OUTFILE. LOAD DATA INFILE ... supports skipping such headers with the IGNORE 1 LINES clause. I'd like something such as: SELECT * FROM my_table INTO OUTFILE '/tmp/my_table.csv' WITH COLUMN HEADERS FIELDS TERMINATED BY ',' ESCAPED BY '\\' LINES TERMINATED BY '\N' Most tools support column headers in flat files, so it makes sense that MySQL should support this too. How to repeat: this is a feature request