List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:January 30 2002 6:31pm
Subject:Re: Structure copy...
View as plain text  
At 17:29 +0100 1/30/02, Vasoczki Ferenc wrote:
>Hi, i want to copy a table structure.
>I saw on the archive, there is a syntax like:
>create [newtable] select * from [sourcetable] where 1=2;
>This is not work on my MySQL server v.3.22
>Is it a 3.23 feature, or am i do something wrong ?

It's a 3.23 feature.

>If you know the solution please tell me that.

You may be able to use the output from mysqldump --no-data db_name tbl_name,
which will produce the CREATE TABLE statement for the table.  Do a substitution
to change the name in the statement, then execute it.
Structure copy...Vasoczki Ferenc30 Jan
  • Re: Structure copy...Paul DuBois30 Jan
RE: Structure copy...Vasoczki Ferenc30 Jan