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
What is dblink?
What is datatype in mysql?
What is mysql and why it is used?
What is mysql and mysqli?
What is the maximum no of columns a table can have?
How to use rank function in mysql?
What are the difference between now and current_date in mysql?
How do I restore a database in mysql workbench?
what is the difference between gui testing and database testing? : Mysql dba
What is a text delimiter?
Is mysql good for big data?
What is a csv table?
How to Join tables on common columns.
What is blob in mysql?
What is int mysql?