How to copy one table data into another table using Mysql Query?
In this post we will give you information about How to copy one table data into another table using Mysql Query?. Hear we will give you detail about How to copy one table data into another table using Mysql Query?And how to use it also give you demo for it if it is necessary.
If you are working on php or any php framwork and you want to copy one table into other table by using sql query, so you could do it using simple SELECT and INSERT statement. just you need to think how you can use.
In Following example you can see how to fetch data from “post” table and how to insert into “post_copy” table, so basically you have to select field of one that you want to copy and second one give name of table with proper field that you want insert. But don’t forgot to give a name of field otherwise it generate error.
INSERT INTO 'post_copy' (name,slug,status)
SELECT name,slug,'1' FROM 'post'
Hope this code and post will helped you for implement How to copy one table data into another table using Mysql Query?. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs