The Rename operation is the easiest to understand—the table simply changes its name and stays in the same database.
The Move operation (shown in the following screenshot) manipulates a table in two ways—changes its name and also the database in which it is stored.
Moving a table is not directly supported by MySQL. So, phpMyAdmin has to create the table in the target database, copy the data, and then finally drop the source table. This could take a long time depending on the table's size.
The Copy operation leaves the original table intact and copies its structure or data (or both) to another table, possibly in another database. Here, the book-copy table will be an exact copy of the book
source table. After the copy, we remain in the Table
view for the book
table, unless we selected Switch to copied table option, in which case we are moved to the Table
view of the newly created table.
The Structure only copy is done to create a test table with the same structure but without the data.
The Copy dialog may also be used to append (add) data from one table to another. Both tables must have the same structure. This operation is achieved by entering the table to which we want to copy the data and choosing Data only.
For example, book data is coming from various sources (various publishers) in the form of one table per publisher and we want to aggregate all the data to one place. For MyISAM
, a similar result can be obtained by using the Merge
storage engine (which is a collection of identical MyISAM
tables). However, if the table is InnoDB
, we need to rely on phpMyAdmin's Copy feature.
18.119.138.202