Skip to main content
You can use the information_schema.tables view to return information about each table in a database. The view is available for each database and contains one row for each table in the database. You can use a SELECT query to return information about each table as shown in the example below. To view table information, you must have USAGE privileges on both the schema and the database. You also need ownership of the table or the necessary table-level privileges required for the intended action.

Columns in information_schema.tables

Each row has the following columns with information about each table. The following example retrieves the name, type, and row count for all base tables:

Rows: 4Execution time: 2.99ms