List:General Discussion« Previous MessageNext Message »
From:Thimble Smith Date:April 3 1999 11:26pm
Subject:Re: IDEA: table cloning
View as plain text  
As a work around, you might try something like this:

mysqldump -d db foo | sed -e 's/^CREATE TABLE foo/CREATE TABLE bar/' | mysql db

Tim

On Sun, Apr 04, 1999 at 12:10:12AM +0300, indrek siitan wrote:
> sorry, if i haven't found the thing i'm proposing in the manual,
> but a really neat thing that would help me a lot would be creating
> a table that has exactly the same structure as some other table.
> for example: CREATE TABLE table2 LIKE table1, that would create
> table table2 with exactly the same structure/keys as table1.
Thread
IDEA: table cloningindrek siitan4 Apr
  • Re: IDEA: table cloningThimble Smith4 Apr
  • IDEA: table cloningMichael Widenius4 Apr
  • Re: IDEA: table cloningBenjamin Scherrey4 Apr
    • Re: IDEA: table cloningMichael Widenius4 Apr
  • Re: IDEA: table cloningVivek Khera5 Apr