Information Schema for MS Access

  • Thread starter Thread starter chris dubuc
  • Start date Start date
C

chris dubuc

All,

How does one query for a list of tables/columns in the
database?

For example, in SQL Server:

Select * from Information_Schema.Tables
or
Select * from Information_Schema.Columns Where
TABLE_NAME = 'Anytable'

will give you a list of the tables/columns in the database.

Oracle has something similar with USER_TABLES

What is the appropriate syntax (if any) for querying the
schema in MS Access?

My goal is to get a list of columns for a given table into
Excel via ODBC.

Thanks in Advance,

Chris
 
What is the appropriate syntax (if any) for querying the
schema in MS Access?

Alas, there is no such table. Access isn't properly relational in this
context!

You'll need to use VBA code to look at the Tabledefs collection, and
loop through the desired Tabledef's Fields collection. See the online
help in the VBA editor for Tabledef.
 
Back
Top