I would really like to create a comment to a view with a short description of its purpose. Unfortunately it is not possible to create comments to views in oracle. This feature is only for tables, columns and materialized views available. I would like to know how you do describe your database views?
Asked
Active
Viewed 1.6k times
3 Answers
9
Try:
comment on table <name> is 'text';
The command works on views. For example:
CREATE OR REPLACE VIEW MY_VW AS
SELECT 1 FROM DUAL;
COMMENT ON TABLE MY_VW IS 'Clever comment.';

Dave Jarvis
- 30,436
- 41
- 178
- 315

Raphaël Althaus
- 59,727
- 6
- 96
- 122
1
Simply use :
Comment on table 'view Name' is ' Comment ...';
If use view in place of SQL , Oracle throws error invalid object category for COMMENT command".
Materialized View : we can simply comment using:
Command on Materialized view "View name" is 'Comment ...';

swiftBoy
- 35,607
- 26
- 136
- 135

Sandeep Kumar
- 46
- 2