Find all tables in database

The below SQL will in a database on a Microsoft SQL-server find all tables with information about the tables schema, name, creation date and modifications date.

select
schema_name(t.schema_id) as schema_name
, t.name as table_name
, t.create_date
, t.modify_date
from sys.tables t
order by table_name
;

Leave a Reply

Your email address will not be published. Required fields are marked *