Mysqldump option to include column names in the first row

I use mysqldump to output all my tables to CSV files as follows:

mysqldump -u -p -t -TC: \ Temp --fields-terminated-by =,

Can mysqldump include column names in the first line of each file?

+3
source share
3 answers

No; you have to do it yourself.

+1
source
mysql test -e"select * from users" | tr '\t' ',' > tocsv.csv

This may not be entirely accurate, but very close to what you are trying to do.

+1
source

MySQL 5.5 (, ), --complete-insert -c .

0

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


All Articles