Oracle 查询库中所有表名、字段名、字段名说明,查询表的数据条数、表名、中文表名
2017-09-02 15:34
351 查看
查询所有表名:
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统计用户下所有的表,字段个数,表数据条数,以及表中文名
- 使用SQL语句查询MySQL,SQLServer,Oracle所有数据库名和表名,字段名
- Oracle 查询库中所有表名、字段名、表名说明、字段名说明(原创)
- 【转】Oracle 查询库中所有表名、字段名、表名说明、字段名说明
- Oracle使用游标查询指定数据表的所有字段名称组合而成的字符串
- Oracle查询所有的字段数据类型
- Oracle使用游标查询指定数据表的所有字段名称组合而成的字符串
- 查询数据库所有(某个)表中字段名,数据类型,说明等
- oracle查询所有表和字段
- oracle中查询字段中包含单引号数据
- 查询Oracle的数据字段与注释
- oracle-查询数据,其中指定字段重复的只取其中一条
- thinkphp 查询数据库数据根据两个字段group,且统计条数用法
- Oracle Coherence中文教程二十二:查询缓存中的数据
- oracle查询中文数据为乱码
- sql 数据库中 查询所有的数据表,字段,数据类型,长度
- oracle 中查询一个表的所有字段名以及属性的sql语句应该怎么写?