Get the App
SLTechnology News&Howtos  ›  Database  › 

Replication of mysql data Table structure

Shulou Source: shulou.com Published: 2022-05-31 18:11:33 10月02日 Update

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!

Tags: Data structure datasheet learning more part help practical next articles methods conditions theory knowledge articles websites materials follow questions China Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi OPPO Reno Xiaomi macOS Shulou Information