How to create a comment on oracle database view

I would really like to create a comment on the view with a brief description of its purpose. Unfortunately, it is not possible to create comments on views in oracle. This function is only for tables, columns, and materialized views. I would like to know how you describe your views in a database?

+4
source share
3 answers

Try:

comment on table <name> is 'text'; 

The team is working on presentations. For instance:

 CREATE OR REPLACE VIEW MY_VW AS SELECT 1 FROM DUAL; COMMENT ON TABLE MY_VW IS 'Clever comment.'; 
+5
source

Commenting on VIEWs is possible:

 COMMENT ON TABLE view_name ; 
+4
source

Just use:

 Comment on table 'view Name' is ' Comment ...'; 

If you use a view instead of SQL, Oracle will issue an invalid object category for the COMMENT command.

Materialized view: we can just comment using:

 Command on Materialized view "View name" is 'Comment ...'; 
+1
source

Source: https://habr.com/ru/post/1412595/


All Articles