Reputation: 4935
After dropping the table, found that the index created on the columns of the dropped table is gone. I just want to know what happens after that. Could someone please explain?
What all are the others getting dropped along with table drop?
Upvotes: 44
Views: 45373
Reputation: 801
In Postgres
DROP TABLE always removes -
1. any indexes
2. rules
3. triggers
4. constraints
that exist for the target table.
Upvotes: 18
Reputation: 306
By default, MS Sql Server also drops indexes when a table is dropped. (Observed in version 13.0.4206.0.)
Upvotes: 12
Reputation: 111
MySQL also drops table indexes when tables are dropped.
For more info, see Does dropping a table in MySQL also drop the indexes?
Upvotes: 11
Reputation: 10395
In Oracle when dropping a table
Upvotes: 54