postgraSql支持View可以修改的兩種方法。
阿新 • • 發佈:2018-04-26
all SQ del tor tle and ase tin amp
http://www.postgresqltutorial.com/postgresql-views/
- Creating PostgreSQL updatable views – gives you examples of creating updatable views that allow you to issue INSERT, UPDATE, and DELETE statement to update data in the base tables through the views.
- Creating updatable views using the WITH CHECK OPTION clause – shows you how to use the
WITH CHECK OPTION
LOCAL
andCASCADED
.
Create Rule的詳細介紹:(9.3版本以上支持)
https://www.postgresql.org/docs/10/static/sql-createrule.html
CREATE [ OR REPLACE ] RULE name AS ON eventTO table_name [ WHERE condition ] DO [ ALSO | INSTEAD ] { NOTHING | command | ( command ; command ... ) } whereevent
can be one of: SELECT | INSERT | UPDATE | DELETE
CHECK OPTION信息介紹:(9.3版本以上支持)
https://www.postgresql.org/docs/current/static/sql-createview.html
CREATE [ OR REPLACE ] [ TEMP | TEMPORARY ] [ RECURSIVE ] VIEW name[ ( column_name [, ...] ) ] [ WITH ( view_option_name [= view_option_value] [, ... ] ) ] AS query [ WITH [ CASCADED | LOCAL ] CHECK OPTION ]
postgraSql支持View可以修改的兩種方法。