Sunday, May 12, 2013

How to copy a table in MySQL

You can copy a table with this script :

create table newtable like oldtable

and also insert with record that old table.

insert into newtable select * from oldtable

Example :

create table z_origins2 like z_origins;
insert into z_origins2 select * from z_origins;

screenshot :




No comments:

Post a Comment