Tuesday, August 14, 2007

DB Metadata: Getting all tables in a tablespace

I was asked by a colleague today:how to show all tables in an Oracle tablespace?:

SELECT UNIQUE(TABLE_NAME) FROM USER_TAB_COLUMNS

There's another way to do it using some form of other metadata available within Oracle. Anyhow, the USER_TAB_COLUMNS table contains a lot of other useful info especially when doing programming at/for the higher metas.