create table tq84_comment_example_tab (
col_1 number,
col_2 varchar2(10)
);
create view tq84_comment_example_view as
select
*
from
tq84_comment_example_tab
where
col_1 > 0;
--
-- The following two select statements select records even though no comments were made so far:
--
select * from user_tab_comments where table_name like 'TQ84_COMMENT_EXAMPLE%';
select * from user_col_comments where table_name like 'TQ84_COMMENT_EXAMPLE%';
comment on table tq84_comment_example_tab is 'A table comment';
comment on table tq84_comment_example_view is 'A view comment';
comment on column tq84_comment_example_tab.col_1 is 'A comment on a table column';
comment on column tq84_comment_example_view.col_2 is 'A comment on a view column';
--
-- The same two queries. This time, they show the comments that were made:
--
select * from user_tab_comments where table_name like 'TQ84_COMMENT_EXAMPLE%';
select * from user_col_comments where table_name like 'TQ84_COMMENT_EXAMPLE%';
drop table tq84_comment_example_tab;
drop view tq84_comment_example_view;