Exposes metadata about a database by using INFORMATION_SCHEMA views.

Using Information Schema Views

The following table lists Information Schema views that are supported by SQL Server Compact 3.5.

View

Contains information about

COLUMNS

Columns accessed to the current user in the current database.

INDEXES

Indexes in the current database.

KEY_COLUMN_USAGE

Keys in the current database.

PROVIDER_TYPES

Data types supported in SQL Server Compact 3.5.

TABLES

Tables accessible to the current user in the current database.

TABLE_CONSTRAINTS

Table constraints in the current database.

REFERENTIAL_CONSTRAINTS

Foreign constraint in the current database

Example

To retrieve data from the views listed above, use the fully qualified name INFORMATION_SCHEMA. This example retrieves information about the tables in the database.

SELECT * FROM INFORMATION_SCHEMA.TABLES