Select * from all_tab_comments; -- select * from user_tab_comments; -- Query all tables and views of the current user. select * from all_col_comments; -- query the column names and comments of all tables of the current user. select * from user_col_comments; -- query the column name and comment of the current user's table select * from all_tab_columns; -- query the structure information of the columns of all users's tables (no remarks) select * from user_tab_columns; -- query the structure information of the columns in the table of the current user (no remarks) -- query the trust information of a table (including column name, data type, length, null, primary key, foreign key, and remarks) SELECT USER_TAB_COLS.COLUMN_NAME as column name, USER_TAB_COLS.DATA_TYPE as data type, USER_TAB_COLS.DATA_LENGTH as length, whether USER_TAB_COLS.NULLABLE as is null, case when (SELECT col. column_name FROM user_constraints con, user_cons_columns col where con. constraint_name = col. constraint_name and con. constraint_type = 'p' and col. table_name = 'table name' and col. column_name = partition) = USER_TAB_COLS.COLUMN_NAME THEN 'y' ELSE 'n' END as whether the primary key is used, case when (select count (*) from user_constraints con, user_cons_columns col, (select t2.table _ name, t2.column _ name, t1.r _ constraint_name from user_constraints t1, user_cons_columns t2 where t1.r _ constraint_name = t2.constraint _ name and t1.table _ name = 'table name') r where con. constraint_name = col. constraint_name and con. r_constraint_name = r. r_constraint_name and con. table_name = 'table name' and col. column_name = USER_TAB_COLS.COLUMN_NAME)> 0 then 'y' else 'n' END as whether it is a foreign key, user_col_comments.comments as remarks FROM USER_TAB_COLS inner join user_col_comments on user_col_comments.TABLE_NAME = USER_TAB_COLS.TABLE_NAME and comment = orders and USER_TAB_COLS.TABLE_NAME = 'table name' order by comment;