top of page

How to clone a table in SQL !!


Couple of commands for cloning a table in MySQL




Already existing tables :
ree

"Employee" table :
ree

For creating table use command :

CREATE TABLE TEST LIKE EMPLOYEE;

ree

For inserting the values use command :

INSERT INTO TEST SELECT * FROM EMPLOYEE ; 

ree

RESULTANT TABLE :

ree

Comments


bottom of page