How we can copy one table data into another table whose name
same as table but in differ database
Answer Posted / guru
INSERT INTO database2.table_name (column_name)
SELECT table_name.column_name FROM table_name
If two databases are in same server, this code will work.
For more details visit,
http://www.phponwebsites.com/2013/12/Copy-values-from-one-database-to-another-in-mysql.html
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the objects can be created using CREATE statement?
How to use 'mysql' to run sql statements?
How to use case expression?
How do I change a procedure in mysql?
How can we get total number of records by query in mysql?
What is username in mysql?
How can you import tables from a sql file into a database by using the mysql client?
What is a mysql model?
How to add a new column to an existing table in mysql?
How do I insert an image into mysql workbench?
What is session variable in mysql?
How do I flush privileges in mysql?
How to use mysqldump to create a copy of the database?
Which is best pdo or mysqli?
What are the functions of commit and rollback statements?