MYSQL: How to export ONLY tables, and field names. Nothing e

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
camarosource
Forum Commoner
Posts: 77
Joined: Sat Aug 03, 2002 10:43 pm

MYSQL: How to export ONLY tables, and field names. Nothing e

Post by camarosource »

Is there a way to export a list of all the tables and fields from mysql? I have a LARGE program that I would like to export the tables with the fields in them categorized as they are in the database. The reason, I would like to find out how the program is structured. Is there a program out there that will do this? Or can phpmyadmin do this? I just want the tables and fields exported (not the coding, nor mysql coding).

I basically only want the table and field names.. Don't care for the NULL's, VARCHAR and sizes, etc.. Just want to export the structure itself.
So if there was a table in the database called table1 with fields field1, field2, field3, & field4. And one called table2 with fields field5, field6, field7, & field8.
Then It would export and show there are 2 tables called table1 and table 2. And in table 1 is ..... fields. and table2 is .... fields. (no NULL, No varchar, no sizes..)
I tried PhpMyAdmin but it also exports all the data like the VARCHAR, INT, NULL, etc.. I just want the tables and the field names that go with them.

Is there a program out there that will be Exactly this? or can PhpMyAdmin some how do just this?
User avatar
xisle
Forum Contributor
Posts: 249
Joined: Wed Jun 25, 2003 1:53 pm

Post by xisle »

timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

mysqldump --help
Post Reply