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 new_table select * from existing_table limit 0
create myTable as select col1, col2 ....from otherTable where 1=2