views:

22

answers:

1

Hi,

I've created and edited a couple of tables and don't want to recreate them from scratch if the database gets erased. What command allows me to "export" the field names and settings (NOT the content) as a ready to use MYSQL command that I can paste back on the MYSQL prompt?

+3  A: 
SHOW CREATE TABLE tablename;

Reference: mySQL docs

Pekka
works perfectly... for others' reference - you can do this within phpmyadmin as well - just enable full view in Options to see the entire text...
DrMHC