Oracle查询所有的用户、用户的表名、用户的字段名

查oracle的版本

	 select *  from v$version 

查询出所有的用户

SELECT * FROM ALL_USERS

查询出所有的表

select * from all_tables
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  	 	 	 	 		
select table_name from all_tables 

查询出指定用户所有的表

SELECT * FROM all_tables WHERE owner = 'QBLLDB7'
-- -- -- -- -- owner = '用户名'-- -- -- -- -- 	 	 	 	 		
select table_name from all_tables WHERE owner = 'QBLLDB7'

查询出当前用户的表

select * from user_tables 		
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
select table_name from user_tables

查询出所有的字段

select * from all_tab_columns 

查询出指定表的所有的字段

select column_name from all_tab_columns where table_name='all_tab_columns'

查询出当前用户的字段

select * from user_tab_columns  
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
select column_name from user_tab_columns where table_name='all_tab_columns'
posted @ 2022-03-07 18:04  叕叕666  阅读(389)  评论(0)    收藏  举报