From: Eric Berg Date: March 30 1999 11:17pm Subject: Re: How do I generate DDL for MySQL database List-Archive: http://lists.mysql.com/mysql/1213 Message-Id: <14081.23459.430522.388640@doobie.spacelab.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Thanks, Alistair, I looked, but didn't find the answer. This might be a good FAQ. -Eric. Alistair MacDonald: [Wednesday 31-March]: > > > On Tue, 30 Mar 1999, Eric Berg wrote: > > > Data Definition Language -- SQL text that will create the tables and indices > > for an existing database. > > > > I'm looking for a script that will look at an existing database and generate > > this from the "show tables", "show columns" and "show indexes" for that > > database. > > Well, apart from the fancy tests for the existance of the database > (non-standard) you could try: > > mysqldump -d > > (Read the manual for full details, but it dumps the contents of the > database without the data ie just the structure) > > Alistair > -- Eric Berg Chief Technical Officer, iParty Corp. eberg@stripped Vice President, New York Linux Users Group eberg@stripped work: 212-331-1229 http://doobie.iparty.com home: 212-721-2872