mysql通过sql来复制表结构
时间:2021-06-02 14:36:16
收藏:0
阅读:0
1、create table resultTable select * from sourceTable where ....;
可以复制条件下的数据,也可以复制数据结构,但是字段上面的比如自增长,不会被复制。
2、create table resultTable like sourceTable;
可以复制表结构,表结构上的信息都会被复制成功。
以上亲测。
评论(0)