php - How to create Table Dynamically with existing table fields in mysql -


currently i'm using table sample1. how can create table sample2 sample1's field dynamically?

you can way.

create table `sample2` select * `sample1`; 

another alternative is

if table structure same can use:

insert `sample2` select * `sample1`; 

Comments

Popular posts from this blog

c# - How can I have the VS Debugger break in the correct location for exceptions thrown in Async methods in a Console App? -

c# - Why Does .NET 4.6 Specific Code Compile When Targeting Older Versions of the Framework? -

php - Issues outputting data after prepared statement with loops -