We often looking for mysql query to copy data from one table to another table.To handle such kind of scenario using mysql query mysql we can use below mysql command.
INSERT INTO new_table (column1, column2, column3) SELECT old_table.column1,old_table.column2,old_table.column3 FROM old_table
Mysql Query to copy data from multiple tables to one table
INSERT INTO new_table (column1, column2, column3) SELECT old_table.column1,old_table1.column2,old_table2.column3 FROM old_table,old_table1,old_table2
For this command you can use join query as well.
The following two tabs change content below.
Chandra Shekhar Pandey is Google certified Cloud engineer, I am Magento2 Trained developer. Having huge experience in designing cloud solution. I have around 12 years of experience with world enterprise IT companies and fortune 500 clients. During my architecture design I am always caring about high availability, fast performance and resilient system. From the programmer background I have huge experience in LAMP stack as well. Throughout my carrier I have worked on Retail, E-Learning, Video Conferencing and social media domain. The motive of creating cutehits was just to share the knowledge/solutions I get to know during my day to day life so that if possible I can help someone for same problems/solutions. CuteHits.com is a really a very effort for sharing knowledge to rest of the world. For any query/suggestion about same you can contact me on below details:-
Email: shekharmca2005 at gmail.com