Does Dropping a Table Drop Triggers?

Does Dropping a Table Drop Triggers?
Dropping a table invalidates dependent objects and removes object privileges on the table. It says dropping a table invalidates dependent objects (lets say trigger ).

.

Also asked, what happens to trigger when table is dropped?

That's if the table the trigger is against is dropped. Your trigger is weird, it's inserting into the same table. In that case, dropping the backup table would invalidate the trigger on the live table, but would not drop it. Only dropping the live table would drop the trigger on the live table.

does dropping a table drop the index SQL Server? By default, MS Sql Server also drops indexes when a table is dropped. (Observed in version 13.0. 4206.0.) DROP TABLE always removes - 1.

Considering this, is synonym dropped when table is dropped?

2 Answers. Dropping a table invalidates objects which have a dependency on the table: those views, synonyms and procedures are not dropped but cannot be used until we intervene to make them compile (e.g. by editing the source code).

When table is dropped what all is dropped?

Dropping a table removes the table definition from the data dictionary. All rows of the table are no longer accessible. All indexes and triggers associated with a table are dropped. All views and PL/SQL program units dependent on a dropped table remain, yet become invalid (not usable).

Related Question Answers

Can we drop a table which has primary key?

In SQL, you can drop a primary key using the ALTER TABLE statement.

Does drop table free up space Oracle?

Unless you specify the PURGE clause, the DROP TABLE statement does not result in space being released back to the tablespace for use by other objects, and the space continues to count toward the user's space quota. For an external table, this statement removes only the table metadata in the database.
Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.