如何创建对 oracle 数据库视图的注释
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10602148/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to create a comment to an oracle database view
提问by eglobetrotter
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?
我真的很想为视图创建一个评论,并对其目的进行简短描述。不幸的是,无法在 oracle 中为视图创建注释。此功能仅适用于可用的表、列和物化视图。我想知道你是如何描述你的数据库视图的?
回答by Rapha?l Althaus
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.';
回答by mcha
Its possible to create a comment on VIEWs too :
也可以在 VIEW 上创建评论:
COMMENT ON TABLE view_name ;
回答by Sandeep Kumar
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".
如果使用 view 代替 SQL ,Oracle 会为 COMMENT 命令抛出错误无效对象类别”。
Materialized View : we can simply comment using:
物化视图:我们可以简单地使用以下方法进行评论:
Command on Materialized view "View name" is 'Comment ...';