Skip to content
Advertisement

Export table description in PHPMyAdmin/MySQL

 DESC table_name

Above SQL allows me to get the table description in PHPMyAdmin. I want to export it to a text file or word file for the documentation. Is there a possible way to do it. Thanks.

Advertisement

Answer

You can do it easily using SELECT…INTO OUTFILE statement reading data from information_schema.tables or information_schema.columns table –

SELECT * FROM information_schema.tables INTO OUTFILE dump_tables.csv

The query will output resultset into specified CSV-file.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement