tables

The view information_schema.tables contains information about all tables and views in the database.

SELECT * FROM information_schema.tables;
SELECT table_schema, table_name, table_type FROM information_schema.tables WHERE NOT is_system;

information_schema.tables

column nametyperemarks
table_catalogVARCHARAlways NULL
table_schemaVARCHAR
table_nameVARCHAR
table_typeVARCHAR
self_referencing_column_nameVARCHARAlways NULL
reference_generationVARCHARAlways NULL
user_defined_type_catalogVARCHARAlways NULL
user_defined_type_schemaVARCHARAlways NULL
user_defined_type_nameVARCHARAlways NULL
is_insertable_intoVARCHARNO or YES
is_typedVARCHARNO or YES
commit_actionVARCHARDELETE or PRESERVE or DROP or NULL when not applicable
schema_idINTEGERreference to sys.schemas.id
table_idINTEGERreference to sys.tables.id
table_type_idSMALLINTreference to sys.table_types.table_type_id
row_countBIGINTApproximate number of rows in the table. Populated only for persistent tables.
is_systemBOOLEANtrue when it is a system table or view, else false
is_viewBOOLEANtrue when it is a view, else false
query_defVARCHARcontents of sys.tables.query
commentsVARCHAR

Note: The last 8 columns (schema_id, table_id, table_type_id, row_count, is_system, is_view, query_def and comments) are extensions to the view as defined by ISO standard. They provide useful information and simplify filtering and joins with system tables/views in sys schema when needed.