oracle查询表名,表字段

oracle查询表信息

select t.* from user_tables t;

如下为查询当前用户下的表名:

select t.table_name from user_tables t;

通过表名查询表字段:

select t.column_name from user_col_comments t where t.table_name = 'T_DDW_F28_IDSTR_DICT_INFO';

select t.column_name from user_col_comments t where t.table_name = '表名';

查询所有表的表名和表说明:

select t.table_name,f.comments from user_tables t inner join user_tab_comments f on t.table_name = f.table_name;

 当然也可查询某个表的:

select t.table_name,f.comments from user_tables t inner join user_tab_comments f on t.table_name = f.table_name 
where t.TABLE_NAME = 'T_DDW_F28_IDSTR_DICT_INFO';

查询模糊表名的表名和表说明:

select t.table_name from user_tables t where t.table_name like 'T_DDW_F28%';
select t.table_name,f.comments from user_tables t inner join user_tab_comments f on t.table_name = f.table_name where t.table_name like 'T_DDW_F28%';

原文:https://www.cnblogs.com/hyq0002013/p/5948419.html

猜你喜欢

转载自blog.csdn.net/u010689849/article/details/82964968