Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What are the objects can be created using CREATE statement?

944


How to use 'mysql' to run sql statements?

1017


How to use case expression?

899


How do I change a procedure in mysql?

938


How can we get total number of records by query in mysql?

853


What is username in mysql?

845


How can you import tables from a sql file into a database by using the mysql client?

964


What is a mysql model?

887


How to add a new column to an existing table in mysql?

943


How do I insert an image into mysql workbench?

896


What is session variable in mysql?

906


How do I flush privileges in mysql?

937


How to use mysqldump to create a copy of the database?

955


Which is best pdo or mysqli?

850


What are the functions of commit and rollback statements?

944