How we can copy one table data into another table whose name
same as table but in differ database
Answer Posted / saket bharti
create table database2.tablename as (select * from
database1.tablename where 1=2);
This will create a new table in database2 with the same
structure as the table in database1 ,but will not contain
any values or constraints of database1 table.
create table database2.tablename as (select * from
database1.tablename );
This will create a new table in database2 with all the
structure and values from the table from database1.
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How to show all records starting with the letters 'sonia' and the phone number '9876543210'
How to control the max size of a heap table?
How do I create a schema in mysql?
Why we use mysqli instead of mysql?
What do ddl, dml, and dcl stand for?
What are the different column comparison operators in mysql?
What is query design?
using primary can we relate two table, with out foreign key?
How to insert html code into mysql database using php?
How we can create index in mysql?
What is insert query in mysql?
Can we save images in mysql database?
How do I disable mysql?
What does mysql_query return?
What is pdo mysql?