Copy an SQL Table


/ Published in: MySQL
Save to your folder(s)

Create a new table from the details of another table then insert the table contents


Copy this code and paste it in your HTML
  1. CREATE TABLE schema.NEWTable LIKE schema.OLDTable;
  2. INSERT schema.NEWTable SELECT * FROM schema.OLDTable;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.