Question: I know that I can add a comment to a
table, but I want to add a column to a view and a materialized view.
Does Oracle allows the COMMENT ON syntax with views?
Answer: Yes, Oracle treats table and view
alike with the COMMENT ON clause, and you can add a comment to a
materialized view with the COMMENT ON MATERIALIZED VIEW clause.
--************************
-- Comment a table
entry
--************************
comment on table
scott.emp
is
‘This is a comment on the employee
table , , , ‘;
--************************
-- Comment a view entry
--************************
comment on table
scott.empview
is
‘This is a comment on the employee
view, a collection of tables , , , ‘;
--************************
-- Comment a
materialized view
--************************
comment on materialized
view
scott.emp_mv
is
‘This is a comment on a materialized
view, a pre-created collection of table rows , , , ‘;
|
|
Get the Complete
Oracle SQL Tuning Information
The landmark book
"Advanced Oracle
SQL Tuning The Definitive Reference" is
filled with valuable information on Oracle SQL Tuning.
This book includes scripts and tools to hypercharge Oracle 11g
performance and you can
buy it
for 30% off directly from the publisher.
|