Please Log In to save to favorites
TAGs
copy table, copy, table, structure, database, databases


Versions
Copy Table Structure into new Table
Copy a table into another table. Does not include copying rows, and this brings the auto_increment (if your table has one) to it's default value
      
    1.   CREATE TABLE [TableName] LIKE [SourceTableName]
Comments


What to do if you want to include copied rows?

Posted by: steven around 17 Months Ago

In case you do want to copy the original rows you should process the following SQL statement:

INSERT INTO [TableName] SELECT * FROM [SourceTableName] ;