To get the list of all Data Base in your SQL Server use below Query:
- SELECT [NAME],DATABASE_ID,CREATE_DATE
- FROM [SYS].[DATABASES]

Image 1.
We have 1 inbuilt Stored Procedure to get list of all Data Base in a SQL Server:
- EXEC sp_database

Image 2.
To get the list of all Data Base in your SQL Server use below Query:


Join the conversation! Your thoughts help the community grow.