Oracle数据库 查询所有表 |
您所在的位置:网站首页 › oracle查看所有表和注释 › Oracle数据库 查询所有表 |
1. 查询当前数据库下的所有表 select * from all_tables where owner = 'TEST';注:all_tables查出来是查得所有用户下的表,当然也包括你登录的用下的表,然后加一个where你要查的那个用户名就可以了。(记得用户名要大写) 2. 查询当前数据库下某个实例数据库的所有表 select * from all_tables where owner = 'TEST' and table_name = '表名';注:当然也包括你登录的用下的表,然后加一个where你要查的那个用户名就可以了。 模糊查询该条件的表名称: select * from all_tables where owner = 'TEST' and table_name like '%S%';3. 查询当前登录用户的所有表 select * from user_tables;简写: select * from tabs;模糊查询该条件的表名称: select * from user_tables where table_name like '%S%';4. 查询所有用户的表,视图等 select * from all_tab_comments;5. 查询本用户的表,视图等 select * from user_tab_comments;6. 查询所有用户的表的列名和注释 select * from all_col_comments;7. 查询本用户的表的列名和注释 select * from user_col_comments;8. 查询所有用户的表的列名等信息 select * from all_tab_columns;9. 查询本用户的表的列名等信息 select * from user_tab_columns;注: 4-9号的都可以在后面加一个 where owner = 'TEST',就是你要查的那个用户名下的信息。 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |