DML Views
1 view of insertable,updable,deletable
SQL> CREATE VIEW V4(or_no, or_date, cust_id)
2 AS SELECT order_id, order_date, customer_id
3 FROM orders
4 WHERE order_date < '30-mar-2007' WITH CHECK OPTION;
檢視已建立。
SQL> select text from user_views where view_name='V4';
TEXT
------------------------------------------------------------
SELECT order_id, order_date, customer_id
FROM orders
WHERE order_date < '30-mar-
SQL> select column_name,insertable,updatable,deletable
2 from user_updatable_columns
3 where column_name in ('OR_NO','OR_DATE','CUST_ID')
4 ;
COLUMN_NAME INS UPD DEL
------------------------------ --- --- ---
OR_NO YES YES YES
OR_DATE YES YES YES
CUST_ID YES YES YES
SQL> select column_name,insertable,updatable,deletable
2 from user_updatable_columns
3 where table_name IN('ORDERS','ORDER_ITEMS')
4 AND column_name in ('ORDER_ID','LINE_ITEM_ID')
5 /
COLUMN_NAME INS UPD DEL
------------------------------ --- --- ---
ORDER_ID YES YES YES
ORDER_ID YES YES YES
LINE_ITEM_ID YES YES YES
----
USER_UPDATABLE_COLUMNS describes columns in a join view that can be updated by the current user, subject to appropriate privileges. Its columns are the same as those in "ALL_UPDATABLE_COLUMNS".
ALL_UPDATABLE_COLUMNS describes all columns in a join view that are updatable by the current user, subject to appropriate privileges.
DBA_UPDATABLE_COLUMNS describes all columns in a join view that are updatable by the database administrator, subject to appropriate privileges.
2 Dml of Object Views
A view is not updatable if its view query contains joins, set operators, rownumthe.columns defined by expression,aggregate functions, GROUP BY, or DISTINCT. If a view query contains pseudocolumns or expressions, the corresponding view columns are not updatable. Object views often involve joins.
---end---
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/13750068/viewspace-718882/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 8.1.1 V$ ViewsView
- 8.1.2 GV$ ViewsView
- Parallel query & viewsParallelView
- External Views (33)View
- Overview of Views (174)View
- barbajs-ViewsJSView
- Some Dictionary Views For ASMViewASM
- Views and Base Tables (243)View
- How Views are Stored (175)View
- How Views Are Used (176)View
- Mechanics of Views (177)View
- Dependencies and Views (180)View
- Object Views (182)ObjectView
- DML Locks Automatically Acquired for DML Statements (349)UI
- mongodb dmlMongoDB
- Parallel DMLParallel
- Oracle's V$ Views(轉)OracleView
- About Static Data Dictionary ViewsView
- Views with the Prefix USER (267)View
- Views with the Prefix ALL (268)View
- Views with the Prefix DBA (269)View
- Globalization Support Parameters in Views (178)View
- Updatable Join Views (181)View
- Overview of Materialized Views (184)ViewZed
- Refresh Materialized Views (189)ZedView
- Oracle Parallel DMLOracleParallel
- [譯]Flutter for Android Developers - ViewsFlutterAndroidDeveloperView
- Whats the difference between the v$sql* viewsSQLView
- Oracle 10G V$ViewsOracle 10gView
- [DW]An article about Materialized Views(zz)ZedView
- Extents in Materialized Views and Their Logs (18)ZedView
- Inline Views (183)inlineView
- Oracle分批提交DMLOracle
- MySQL DML語句MySql
- Xamarin.Forms Views介紹(五)ORMView
- Python Web框架(URL/VIEWS/ORM)PythonWeb框架ViewORM
- Automatic Workload Repository ViewsView
- Some examples of using these views follow.View