If you want to copy a table from one Database to another database , You can simply do as below.
CREATE TABLE db2.table LIKE db1.table;
INSERT INTO db2.table SELECT * FROM db1.table;
More Related Contents:
- You can’t specify target table for update in FROM clause
- Generating a range of numbers in MySQL
- How to get next/previous record in MySQL?
- How do I make a row generator in MySQL?
- MySQL INSERT INTO table VALUES.. vs INSERT INTO table SET
- MySQL number of items within “in clause”
- Error 1046 No database Selected, how to resolve?
- What’s the difference between VARCHAR and CHAR?
- Alter a MySQL column to be AUTO_INCREMENT
- MySQL ON DUPLICATE KEY UPDATE for multiple rows insert in single query
- single fixed table with multiple columns vs flexible abstract tables
- MySQL remove duplicates from big database quick
- mysql, iterate through column names
- How to delete from select in MySQL?
- How to delete Duplicates in MySQL table
- How to ORDER BY a SUM() in MySQL?
- mySQL Returning the top 5 of each category
- Selecting Random Rows in MySQL
- Error: The used SELECT statements have a different number of columns
- How to Optimize Queries in a Database – The Basics
- Any way to achieve fulltext-like search on InnoDB
- Create date from day, month, year fields in MySQL
- Can I use a MySQL database with an App Engine application
- How to combine aggregate functions in MySQL?
- How do I list all the columns in a table?
- Two single-column indexes vs one two-column index in MySQL?
- What’s the correct name for an “association table” (a many-to-many relationship) [closed]
- sql pulling a row for next or previous row of a current row
- Row Rank in a MySQL View
- Select Rows with Maximum Column Value group by Another Column