select TABLE_NAME from user_tables;    -- 获取表
 select * from user_tab_comments;      -- 获取表注释
 select * from User_Col_Comments;       -- 获取字段注释

  

-- 导出文档		
SELECT
	t.TABLE_NAME,
	t.COLUMN_NAME,
	REPLACE (
		REPLACE ( REPLACE ( t1.COMMENTS, chr( 10 ), '' ), chr( 13 ), '' ),
		chr( 9 ),
		'' 
	),
	t.DATA_TYPE,
	t.DATA_LENGTH,
	NVL( NULL, '' ),
	NVL( NULL, '' ),
	t.NULLABLE,
	NVL( NULL, '无' ),
	case when t.COLUMN_NAME = 'ID' THEN  '是' else '否'  end ,
	REPLACE (
		REPLACE ( REPLACE ( t1.COMMENTS, chr( 10 ), '' ), chr( 13 ), '' ),
		chr( 9 ),
		'' 
	),
	
	NVL( NULL, '新增' ),
	NVL( NULL, '' ) 
FROM
	user_tab_columns t,
	User_Col_Comments t1 
WHERE
    t.TABLE_NAME =t1.TABLE_NAME
		and t1.column_name = t.COLUMN_NAME
	and t.TABLE_NAME = 'SCFP_XP_CJXP_XXFWS'    --表名  需要修改
ORDER BY
	COLUMN_ID;


  

本文档参考:https://blog.51cto.com/meiling/2068902

 

相关文章:

  • 2022-12-23
  • 2021-11-21
  • 2021-11-06
  • 2021-09-04
  • 2022-02-21
  • 2021-09-04
  • 2021-09-14
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2020-03-23
  • 2021-09-24
  • 2021-11-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案