What happens to synonym when table is dropped in Oracle?
Dropping a table removes the table definition from the data dictionary. All synonyms for a dropped table remain, but return an error when used. All extents allocated for a table that is dropped are returned to the free space of the tablespace and can be used by any other object requiring new extents or new objects.
What happens when you delete a base table that belongs to a view?
1 Answer. Deleting a row in a table will affect the results from regular views. Views are not executed when they are created. They are executed when they are referenced.
What happens to a synonym when the underlying object is dropped?
The status of some of the synonyms that are invalid due to the underlying objects being deleted is showing as ‘VALID’ in the dba_objects table when they are ‘touched’ so this criteria cannot be used to get the invalid synonym list . …
Can you delete from a view?
7 Answers. Well you can delete from a view if that is what you are asking, but you can’t have a view that deletes information. The view is a portion of data from the underlying tables. Provided that you have permissions, you can do the same data manipulation in views that you can do to a table directly.
Can we create synonym for package in Oracle?
Use the CREATE SYNONYM statement to create a synonym, which is an alternative name for a table, view, sequence, procedure, stored function, package, materialized view, Java class schema object, user-defined object type, or another synonym. Synonyms provide both data independence and location transparency.
What happens when a table is deleted from a database?
The RESTRICT clause, prevents a relation to be dropped if it is referenced by any of the constraints or views. This query will delete the table as well as drop all the integrity constraints and views associated with it. The two clauses that can be used with the DROP TABLE command are CASCADE and RESTRICT.
Is the deleted table the same as the trigger table?
The deleted table and the trigger table ordinarily have no rows in common. The inserted table stores copies of the affected rows during INSERT and UPDATE statements.
How is an update transaction similar to a delete?
An update transaction is similar to a delete operation followed by an insert operation; the old rows are copied to the deleted table first, and then the new rows are copied to the trigger table and to the inserted table. When you set trigger conditions, use the inserted and deleted tables appropriately for the action that fired the trigger.
What are the rules for inserted and Deleted tables?
The inserted and deleted tables passed to INSTEAD OF triggers defined on tables follow the same rules as the inserted and deleted tables passed to AFTER triggers. The format of the inserted and deleted tables is the same as the format of the table on which the INSTEAD OF trigger is defined. Each column in the inserted and deleted tables maps