Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: stonysmithThe query below will retrieve all the table and column names from an Oracle database.
There is a similar type of query you can run for other database vendors.
select at.owner,atc.TABLE_NAME,
atc.COLUMN_NAME,
atc.DATA_TYPE,
atc.DATA_LENGTH,
atc.DATA_PRECISION,
atc.DATA_SCALE,
atc.NULLABLE
from sys.all_tables at
left outer join sys.all_tab_columns atc
on at.table_name = atc.table_name