为什么我看不到专栏的评论?
Why can't I see comment on column?
我看不到专栏的评论。
我认为一切都做得很好,但我没有得到我想要的
create table TRANSAKCIJE (
tx_id number generated by default as identity,
acc_id number,
tx_date date,
tx_iznos number,
constraint fk_accounts
foreign key(acc_id)
references accounts(acc_id)
);
comment on column transakcije.tx_id
is 'This is transaction ID';
comment on column transakcije.acc_id
is 'This is accounts ID';
comment on column transakcije.tx_date
is 'This is transaction DATE';
comment on column transakcije.tx_iznos
is 'This is transaction AMOUNT';
commit;
desc transakcije;
我得到了这个输出:
Name Null? Type
-------- -------- ------
TX_ID NOT NULL NUMBER
ACC_ID NUMBER
TX_DATE DATE
TX_IZNOS NUMBER
您需要查询数据字典视图USER_COL_COMMENTS
来显示当前用户拥有的表和视图的列的注释,例如using
select column_name, comments
from user_col_comments
where table_name = 'TRANSAKCIJE'
如果您需要直接在表格中添加评论,您可以使用 USER_TAB_COMMENTS
我看不到专栏的评论。
我认为一切都做得很好,但我没有得到我想要的
create table TRANSAKCIJE (
tx_id number generated by default as identity,
acc_id number,
tx_date date,
tx_iznos number,
constraint fk_accounts
foreign key(acc_id)
references accounts(acc_id)
);
comment on column transakcije.tx_id
is 'This is transaction ID';
comment on column transakcije.acc_id
is 'This is accounts ID';
comment on column transakcije.tx_date
is 'This is transaction DATE';
comment on column transakcije.tx_iznos
is 'This is transaction AMOUNT';
commit;
desc transakcije;
我得到了这个输出:
Name Null? Type
-------- -------- ------
TX_ID NOT NULL NUMBER
ACC_ID NUMBER
TX_DATE DATE
TX_IZNOS NUMBER
您需要查询数据字典视图USER_COL_COMMENTS
来显示当前用户拥有的表和视图的列的注释,例如using
select column_name, comments
from user_col_comments
where table_name = 'TRANSAKCIJE'
如果您需要直接在表格中添加评论,您可以使用 USER_TAB_COMMENTS