Re: how to query the structure of a database

From: Wolf Nuecker <wolfn_at_web.de>
Date: 29 Jan 2002 03:33:53 -0800
Message-ID: <f21aa9bf.0201290333.3796e083_at_posting.google.com>


"Massimo Fuccillo" <mfuccillonospam_at_tiscalinetnospam.it> wrote in message news:<D8958.18173$6e5.625842_at_twister2.libero.it>...
> Hi all
>
> Is there a standard way (using SQL) to query the structure of a database?
>
> In other words:
> one or more query to obtain the names of the non system tables,
> one or more query, for each table, to obtain field names, field types, field
> sizes
> one or more query for the constraints, indexes etc.
> independently from the database provider (Oracle, Db2, Sqlserver, etc)
>
> Thanks in advance for any suggestion.
>
> Regards
>
> Massimo Fuccillo

For SQL92(full) you should find standard tables (TABLES, USERS etc.) in schema INFORMATION_SCHEMA, but few DB-vendors actually seem to care...

regards
Wolf Nücker Received on Tue Jan 29 2002 - 12:33:53 CET

Original text of this message