List databases in Azure SQL Database

The query below lists the databases in Azure SQL Database.

Query

select [name] as database_name,
    database_id,
    create_date
from sys.databases
order by name

Columns

  • database_name - name of the database
  • database_id - database id, unique within an instance of Azure SQL Database
  • created_date - date the database was created or renamed

Rows

  • One row: represents one database
  • Scope of rows: all databases in Azure SQL Database, including the system database
  • Ordered by: database name

Sample results

View of databases in Azure SQL Database. Blue rectangle selects the system database.