I am new to MySQL. I would like to copy the content of one table to another table within the same database. Basically, I would like to insert to a table from another table. Is there easy way of doing this?
Mysql – In MySQL, how to copy the content of one table to another table within the same database
databaseMySQLsql
Related Topic
- Mysql – How to output MySQL query results in CSV format
- Mysql – Create new user in MySQL and give it full access to one database
- Sql – How to UPDATE from a SELECT in SQL Server
- Sql – Finding duplicate values in a SQL table
- Sql – What are the options for storing hierarchical data in a relational database
- Mysql – How to get the sizes of the tables of a MySQL database
- Mysql – How to import an SQL file using the command line in MySQL
Best Answer
INSERT INTO TARGET_TABLE SELECT * FROM SOURCE_TABLE;
EDIT: or if the tables have different structures you can also:
EDIT: to constrain this..