Mubashshir
  • Home

Copy an existing MySQL table to a new table

mubashshir
January 27, 2012

[code lang=”sql”]
— orginalTableName can be same as newTableName
CREATE TABLE newTableName
LIKE orignalDBName.orignalTableName;
INSERT newTableName
SELECT *
FROM orignalDBName.orignalTableName;
[/code]

Tags:
  • backup
  • code
  • data transfer
  • mysql
  • tables

Related Articles

August 25, 2020

Hello world!

December 23, 2011

Programmer Competency Matrix

December 21, 2011

Well I lost all my posts… but oh well.

Mubashshir

© Mubashshir. 2022 Htmlstream. All rights reserved