CREATETABLEALIKEB this method copies the complete field structure and Index of Table B to table A when copying Table B to table. CREATETABLEAASSELECTx, x, x, xxFROMBLIMIT0 this method only copies the field structure of Table B to table A, but does not copy the index of Table B to table. This method is more flexible.
Create table a like B. When table B is copied to table a, the complete field structure and Index of table B are copied to TABLE. Create table a as select x, xx from B limit 0 this method will only copy the field structure of table B to TABLE, however, indexes in Table B are not copied to table. This method is more flexible.
CREATE TABLE A LIKE B
In this way, when Table B is copied to table A, the complete field structure and indexes of Table B are copied to table.
Create table a as select x, xx from B LIMIT 0
This method only copies the field structure of Table B to table A, but does not copy the index of Table B to table. This method is flexible. you can specify the fields to be copied while copying the structure of the original table. you can also add the field structure as needed to copy the table.
Both methods do not copy the permission settings when copying a table. For example, if you have set permissions for Table B, after copying, table A does not have permissions similar to table B.
Leave it blank. next we will discuss the performance of the two types of replication tables.