ORACLE中查询系统中的所有表和查询某张表中所有字段的名称的SQL写法


ORACLE中查询系统中的所有表和查询某张表中所有字段的名称的SQL写法
利用ORACLE的系统表进行操作。
ALL_开头
select * from sys.all_all_tables;
select *from sys.all_tab_cols;
select * from sys.all_tab_columns;
具体例子:
SELECT * FROM SYS.All_Tab_Columns tc
where tc.TABLE_NAME='SD_DUTY_LOG'
AND tc.column_name LIKE 'HNSLT_NET%'
附上DBA常用的一些表。
select username from dba_users;
select * from dba_data_files;
select * from dba_objects;
select * from dba_tables where table_name='POD';
select * from dba_sequences WHERE sequence_owner='WEIZHI';
select * from dba_views where owner='WEIZHI';
select * from all_views where owner='WEIZHI';
select * from dba_db_links;

猜你喜欢

转载自892530175-qq-com.iteye.com/blog/1667831