On Friday, June 14, 2002, at 04:06  PM, Hihn Jason wrote:

> I have a large number of tables that have been created through the 
> years,
> and I wish to obtain the SQL statements used to create them. I can go
> through and do it all by hand, but that would take forever. Is there a 
> way
> to run a script against the database that will generate them for me? If 
> it
> misses the occasional additional index, then that is fine.

If you have the mysql client programs and are using a Unix machine 
(maybe even Win but I'm not sure) you can use the mysqldump program.  It 
is usually located in the "bin" directory of your MySQL distribution.  
Mine is /usr/local/mysql/bin/mysqldump.

Read up on it, it can dump all data from your database and does so with 
the CREATE TABLE statements attached so that the whole thing can 
literally be rebuilt from scratch.  Just chop off the contents if you 
only want the CREATE TABLE statements.


Erik




----

Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to