sql - Why can't I see comment on column?
问题描述
I Can't see comment on column.
I think everything is done well, but I don't get what I want
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;
I got this output:
Name Null? Type
-------- -------- ------
TX_ID NOT NULL NUMBER
ACC_ID NUMBER
TX_DATE DATE
TX_IZNOS NUMBER
解决方案
You need to query Data Dictionary view USER_COL_COMMENTS
to display comments on the columns of the tables and views owned by the current user, such as using
select column_name, comments
from user_col_comments
where table_name = 'TRANSAKCIJE'
If you need comments added directly on tables you can use USER_TAB_COMMENTS
推荐阅读
- ios13 - 如何在 iOS 13.x 中支持 UIlabelTextColor 的暗模式?
- python - 放大后无法获取任何元素的屏幕截图
- ios - 为什么 webView 页面上没有可点击的 Google Maps 搜索?
- c# - 我想通过从下拉列表中选择颜色来更改面板的背景颜色
- javascript - 如何在异步承诺中取消订阅以避免 Reactjs 中的内存泄漏
- eclipse - 有没有办法阻止日食搜索重复结果
- ios - 链接名为“fbad_Cocos2DGetGLViewController”的全局变量:符号多重定义
- javascript - 为 MongoDB 编写相关数据文件
- android - 在使用 gRPC 库的 Android 项目上添加 Google 服务插件时出现 Gradle 同步错误
- android - 如何使用 Intent.ACTION_CREATE_DOCUMENT 编写文件