CREATE TABLE newtable SELECT * FROM oldtable LIMIT 0; -----Original Message----- From: Todd Ellner [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 12:58 PM To: [EMAIL PROTECTED] Subject: sql: Copying the structure of DBs
I need to create multiple databases from time to time. This isn't a problem. The thing that seems tricky is creating databases with the same table names and structures, but none of the data, of old ones. I thought chapter 4 of the documentation covered this, but it doesn't quite seem to. Any suggestions? Is there a quick way to do this in MySQL? Or will I have to do something kludgy like parsing the output of a mysql "DESCRIBE" statement and making a create statement out of it? Todd --------------------------------------------------------------------- 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 --------------------------------------------------------------------- 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