Maria DB stores an IS_UPDATABLE flag with each view, so it is always possible to see if Maria DB considers a view updatable (although not necessarily insertable) by querying the IS_UPDATABLE column in the INFORMATION_SCHEMA. The WITH CHECK OPTION clause is used to prevent updates or inserts to views unless the WHERE clause in the SELECT statement is true. WITH LOCAL CHECK OPTION restricts the CHECK OPTION to only the view being defined, while WITH CASCADED CHECK OPTION checks all underlying views as well.CASCADED is treated as default if neither keyword is given.Views or tables that participate in a view created with the SCHEMABINDING clause cannot be dropped, unless that view is dropped or changed so that it no longer has schema binding. Also, executing ALTER TABLE statements on tables that participate in views that have schema binding fail if these statements affect the view definition. VIEW_METADATA Specifies that the instance of SQL Server will return to the DB-Library, ODBC, and OLE DB APIs the metadata information about the view, instead of the base table or tables, when browse-mode metadata is being requested for a query that references the view. When SCHEMABINDING is specified, the base tables cannot be modified in a way that would affect the view definition.
-If the view is defined based on one and only one table.
, that is to say can the engine uniquely identify the row(s) to be updated and secondly are the fields updateable.
If your view has a calculated field or represents the product of a parent/child join then the default answer is probably no. in MS SQL Server and Oracle (to take just two examples) you can have triggers that fire when you attempt to insert or update a view such that you can make something that the server doesn't think updateable into something that is - usually because you have knowledge that the server can't easily infer from the schema. You can't update an aggregate column in a view for example.
When you use SCHEMABINDING, the ) of tables, views, or user-defined functions that are referenced. Business Entity ID WHERE Hire Date Note The feedback system for this content will be changing soon. If content within a comment thread is important to you, please save a copy.
All referenced objects must be in the same database. For more information on the upcoming change, we invite you to read our blog post.