Replication of mysql data Table structure
This article mainly introduces "replication of mysql data table structure". In daily operation, I believe that many people have doubts about the replication of mysql data table structure. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "replication of mysql data table structure". Next, please follow the editor to study!
Copy the structure of the table
CREATE TABLE copy LIKE author
Copy the structure of the table with additional data
CREATE TABLE copy2SELECT * FROM author
Copy only part of the data and structure
CREATE TABLE copy3SELECT id,au_nameFROM author WHERE nation=' China'
Only part of the structure is copied without data, that is, the condition of the data is always untenable.
CREATE TABLE copy4SELECT id,au_nameFROM authorWHERE 0; at this point, the study on "replication of mysql data table structure" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!