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


Please Help Members By Posting Answers For Below Questions

How to create a table?

626


How can we run batch mode in mysql?

611


What are views in mysql?

598


What is maximum table size in mysql?

567


What is difference mysql and mysqli?

591






In which format data is stored in mysql database?

616


How many columns can a table have?

555


How do I backup mysql database on linux?

569


What is mysqli_free_result?

588


how to take mysql database backup?

673


What are the disadvantages of mysql?

650


Is primary key auto increment?

595


What are the difference between mongodb and mysql?

769


How do I start mysql from command line?

604


How to create a new table in mysql?

619