1、oracle:
SELECT t1.COLUMN_NAME,
t2.COMMENTS
FROM user_tab_columns t1,
user_col_comments t2
WHERE t1.TABLE_NAME='表名'
AND t1.TABLE_NAME =t2.TABLE_NAME
AND t1.COLUMN_NAME =t2.COLUMN_NAME;
2、通过ResultSetMetaData中获取字段名,但是不能获取字段注释
1、oracle:
SELECT t1.COLUMN_NAME,
t2.COMMENTS
FROM user_tab_columns t1,
user_col_comments t2
WHERE t1.TABLE_NAME='表名'
AND t1.TABLE_NAME =t2.TABLE_NAME
AND t1.COLUMN_NAME =t2.COLUMN_NAME;
2、通过ResultSetMetaData中获取字段名,但是不能获取字段注释