Saturday, January 26, 2013

SQL :: Information Schema Views

You can select the structure of your schema (tables, columns, ...etc.) in most DBs

for example SQL using what is called Information Schema Views

SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE'
and oracle uses:
SELECT owner, table_name
  FROM dba_tables
or
SELECT owner, table_name
  FROM all_tables
or
SELECT table_name
  FROM user_tables
good luck :)

No comments:

Post a Comment