Score:0

How to extract the Table Definitions of a MYSQL Table into CSV?

uz flag

The output of mysqldump -not csv does not contain the columns, just values:

select * from AUDIT_RESULT 
INTO OUTFILE '/va/tmp/audit_nresult.csv'

FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n';

It does not contain the column names just the values. How to get the column names also?

djdomi avatar
za flag
https://stackoverflow.com/questions/12040816/dump-all-tables-in-csv-format-using-mysqldump does this solve your Issue?
ua flag
See also https://hevodata.com/learn/mysql-export-to-csv/
Score:1
mx flag

Export Table into CSV Format Using MySQL Workbench

  1. Run the statement/query and get its result set.

  2. Then, in the result panel, click "export recordset to an external file" option. The recordset is used for the result set.

  3. Finally, a new dialog box will be displayed. Here, we need to provide a filename and its format.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.