Showing posts with label Copy table and data. Show all posts
Showing posts with label Copy table and data. Show all posts

Friday, December 14, 2012

Copy an existing MySQL table to a new table

This Command is used to create new table with the structure and data of an existing table.


Existing Table name : users


New Table name : users_Mon

 

CREATE TABLE users_Mon LIKE users; INSERT users_Mon SELECT * FROM users;