Oracle 查询库中所有表名、字段名、字段名说明,查询表的数据条数、表名、中文表名、
2017-12-19 16:47
399 查看
查询所有表名:
select t.table_name from user_tables t;
查询所有字段名:
select t.column_name from user_col_comments t;
查询指定表的所有字段名:
select t.column_name from user_col_comments t where t.table_name = 'BIZ_DICT_XB';
查询指定表的所有字段名和字段说明:
select t.column_name, t.column_name from user_col_comments t where t.table_name = 'BIZ_DICT_XB';
查询所有表的表名和表说明:
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 from user_tables t where t.table_name like 'BIZ_DICT%';
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 'BIZ_DICT%';
--查询表的数据条数、表名、中文表名
select a.num_rows, a.TABLE_NAME, b.COMMENTS
from user_tables a, user_tab_comments b
WHERE a.TABLE_NAME = b.TABLE_NAME
order by TABLE_NAME;
select t.table_name from user_tables t;
查询所有字段名:
select t.column_name from user_col_comments t;
查询指定表的所有字段名:
select t.column_name from user_col_comments t where t.table_name = 'BIZ_DICT_XB';
查询指定表的所有字段名和字段说明:
select t.column_name, t.column_name from user_col_comments t where t.table_name = 'BIZ_DICT_XB';
查询所有表的表名和表说明:
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 from user_tables t where t.table_name like 'BIZ_DICT%';
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 'BIZ_DICT%';
--查询表的数据条数、表名、中文表名
select a.num_rows, a.TABLE_NAME, b.COMMENTS
from user_tables a, user_tab_comments b
WHERE a.TABLE_NAME = b.TABLE_NAME
order by TABLE_NAME;
相关文章推荐
- Oracle 查询库中所有表名、字段名、字段名说明,查询表的数据条数、表名、中文表名
- Oracle 查询库中所有表名、字段名、字段名说明,查询表的数据条数、表名、中文表名、
- oracle统计用户下所有的表,字段个数,表数据条数,以及表中文名
- Oracle使用游标查询指定数据表的所有字段名称组合而成的字符串
- Oracle使用游标查询指定数据表的所有字段名称组合而成的字符串
- 查询数据库所有(某个)表中字段名,数据类型,说明等
- 使用SQL语句查询MySQL,SQLServer,Oracle所有数据库名和表名,字段名
- Oracle 查询库中所有表名、字段名、表名说明、字段名说明(原创)
- 【转】Oracle 查询库中所有表名、字段名、表名说明、字段名说明
- Oracle查询所有的字段数据类型
- oracle通过表中2个字段分组查询取数量最大的所有记录,有条件的去重
- thinkphp 查询数据库数据根据两个字段group,且统计条数用法
- 如何在Oracle中查询Date类型字段的数据
- 32位连接64位oracle查询数据中文乱码
- 查询表中某个字段不重复的所有数据的常用两种方法
- oracle 查询表中字段里数据是否有重复
- 如何用SQL语句查询一个数据表所有字段的类型
- SQL批量删除指定数据表中的所有字段说明属性
- oracle查询常用的知识点之日期,重复字段,groupby,查询大量数据时优化