Update complex view oracle




















YES , you can Update and Insert into view and that edit will be reflected on the original table Stack Overflow for Teams — Collaborate and share knowledge with a private group.

Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Ask Question. Asked 12 years, 2 months ago. Active 5 years, 11 months ago. Viewed k times. Bastien Vandamme. Bastien Vandamme Bastien Vandamme I mean record. This allows altering view without dropping, recreating, and re-granting object privileges. This command creates the view if it is not existent and modifies the view if it is existent. All the plsql units which are accessing the view will become invalid after the view modification.

Dropping a view has no effect on the base tables on which view is based. Users who were accessing the data of the base tables using view will no longer be able to access the data of the base tables. When you update record s in a VIEW, it updates the records in the underlying tables that make up the View. Specify names for the expressions selected by the defining query of the view.

The number of aliases must match the number of expressions selected by the view. Aliases must follow the rules for naming Oracle Database schema objects. Aliases must be unique within the view. If you omit the aliases, the database derives them from the columns or column aliases in the query. For this reason, you must use aliases if the query contains expressions rather than only column names.

Also, you must specify aliases if the view definition includes constraints. Restriction on View Aliases You cannot specify an alias when creating an object view.

You can specify constraints on views and object views. Oracle Database does not enforce view constraints. For a full discussion of view constraints, including restrictions, please refer to "View Constraints".

If you omit schema , then the database creates the object view in your own schema. This clause lets you specify the attributes of the object type that will be used as a key to identify each row in the object view.

In most cases these attributes correspond to the primary key columns of the base table. You must ensure that the attribute list is unique and identifies exactly one row in the view. Restrictions on Object Views Object views are subject to the following restrictions:.

If you try to dereference or pin a primary key REF that resolves to more than one instance in the object view, then the database returns an error. In database diagram, a car belongs to one brand while a brand has one or many cars. The relationship between brand and car is a one-to-many. The following SQL statements create the cars and brands tables; and also insert sample data into these tables.



0コメント

  • 1000 / 1000