Oracle使用筆記

1、查詢全部字段名code

select c.TABLE_NAME
from all_constraints p, all_constraints c
where p.table_name = 'TIME_TABLE_LAYOUT'
  and p.OWNER = SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA')
  and c.OWNER = SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA')
  and c.constraint_type = 'R'
  and p.CONSTRAINT_NAME = c.R_CONSTRAINT_NAME ;

2、查詢字段註釋table

select * from user_col_comments where Table_Name = '表名'
相關文章
相關標籤/搜索