1. Search all indexes of a table (including index names, types, and columns): selectt. *, I. index_typefromuser_ind_columnst, user_indexesi
1. query all indexes of a table (including index names, types, and columns): select t. *, I. index_type from user_ind_columns t, user_indexes I
1. Search for all indexes of a table (including index names, types, and columns ):
Select t. *, I. index_type from user_ind_columns t, user_indexes I where t. index_name = I. index_name and t. table_name = I. table_name and t. table_name = table to be queried
2. Search for the table's primary key (including names and columns ):
Select cu. * from user_cons_columns cu, user_constraints au where cu. constraint_name = au. constraint_name and au. constraint_type = 'p' and au. table_name = table to be queried
3. query the uniqueness constraints of a table (including names and columns ):
Select column_name from user_cons_columns cu, user_constraints au where cu. constraint_name = au. constraint_name and au. constraint_type = 'U' and au. table_name = table to be queried
4. Search for the table's foreign key (including the name, referenced table name, and corresponding key name. The following is a multi-step query ):
Select * from user_constraints c where c. constraint_type = 'r' and c. table_name = table to be queried
Query the names of Columns with foreign key constraints:
Select * from user_cons_columns cl where cl. constraint_name = foreign key name
Query the column name of the key of the referenced table:
Select * from user_cons_columns cl where cl. constraint_name = foreign key reference table key name
5. query all the columns and their attributes of the table.
Select t. *, c. COMMENTS from user_tab_columns t, user_col_comments c where t. table_name = c. table_name and t. column_name = c. column_name and t. table_name = the table to be queried ......