MySQL create table xxx select * from yyy 的坑

create table xxx select * from yyy;

The wording does not: a primary key , indexes , constraints , since by
such an approach does not: a primary key , indexes , constraints , since by
such an approach does not: a primary key , indexes , constraints , increment
important things to say three times;
alternatives:

create table xxx like yyy;
insert into xxx select * from yyy;

Guess you like

Origin blog.csdn.net/ManWZD/article/details/109202835