Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以复制一个 MySQL 表来创建一个新表:
CREATE TABLE newtable SELECT * FROM oldtable
这可行,但索引不会复制到新表中。如何复制包含索引的表?
CREATE TABLE newtable LIKE oldtable; INSERT INTO newtable SELECT * FROM oldtable;