Does dropping a table in MySQL also drop the indexes?

后端 未结 3 931
失恋的感觉
失恋的感觉 2020-12-09 01:28

It\'s not explicitly mentioned in the documentation (http://dev.mysql.com/doc/refman/6.0/en/drop-table.html). I ask because I just saw a curious database migration in a Rai

3条回答
  •  独厮守ぢ
    2020-12-09 02:01

    Yes, it does.

    However, if you have foreign key constraints such as RESTRICT that ensure referential integrity with other tables, you'll want to drop those keys prior to dropping or truncating a table.

提交回复
热议问题