Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/oracle/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql 为什么我看不到专栏上的评论?_Sql_Oracle_Ddl - Fatal编程技术网

Sql 为什么我看不到专栏上的评论?

Sql 为什么我看不到专栏上的评论?,sql,oracle,ddl,Sql,Oracle,Ddl,我看不到对专栏的评论 我认为一切都做得很好,但我没有得到我想要的 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) ); c

我看不到对专栏的评论

我认为一切都做得很好,但我没有得到我想要的

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

您需要查询Data Dictionary view USER_COL_COMMENTS以显示当前用户拥有的表和视图的列上的注释,例如使用

select column_name, comments
  from user_col_comments
 where table_name = 'TRANSAKCIJE'
如果需要直接在表上添加注释,可以使用用户选项卡注释


相同的problem@petar对不起,我错过了评论不是在表上而是在列上的部分。因此,请使用用户注释代替标题我编辑了答案。感谢您的努力,但我无法获得注释。我获得0comments@petar我添加了一个演示。