Tuesday, December 11, 2007

Oracle - SQL Plus - See avaible tables in your table space

To see all the table available inside your table space you can use the views available inside sys schema:

SQL> select table_name from user_tables;

Now lets try to have additional information:

SQL>select sys.USER_TABLES.table_name, sys.USER_TAB_COLS.COLUMN_NAME, sys.USER_TAB_COLS.DATA_TYPE
from sys.USER_TABLES
join sys.USER_TAB_COLS on sys.USER_TAB_COLS.TABLE_NAME = sys.USER_TABLES.TABLE_NAME
order by sys.USER_TABLES.table_name asc;


No comments: