Oracle列出所有表名,列名

搞了一天.可能有更好的方法.

测试环境: oracle xe 11g


1 显示所有表名:
select table_name from user_tables;

2 显示所有列名:
select OWNER, TABLE_NAME, COLUMN_NAME
from all_tab_columns 
where table_name = atablename;

附:
-- Example: create temporary table.  http://stackoverflow.com/questions/2671518/how-to-create-a-temporary-table-in-oracle
CREATE GLOBAL TEMPORARY TABLE Table_name
    (startdate DATE,
     enddate DATE,
     class CHAR(20))
  ON COMMIT DELETE ROWS;


你可能感兴趣的:(Oracle列出所有表名,列名)