This is a discussion on INSERT SELECT with multiple databases within the MySQL Database forums, part of the Database Forums category; Hello, I want to do an insert select, where data from one table in one database is copied into another ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello,
I want to do an insert select, where data from one table in one database is copied into another table in another database. The databases are on the same server. The tables have the same structure. I have tried: INSERT INTO db1.table SELECT * FROM db2.table but I keep getting this error: Incorrect table name Is it possible to do an INSERT SELECT with different databases on the same server? |
|
|||
|
> I have tried: INSERT INTO db1.table SELECT * FROM db2.table
> but I keep getting this error: Incorrect table name > > Is it possible to do an INSERT SELECT with different databases on the > same server? > I tried the same, but without "db1.", so from the database "db1": use db1; INSERT INTO table SELECT * FROM db2.table; No problems whatsoever. Best regards. |