GET All database name in sql server code example
Example 1: get database list in sql server
SELECT name FROM master.dbo.sysdatabases
Example 2: sql get database name
To get the current database name use select db_name().
DB_NAME(Transact-SQL)
SELECT name FROM master.dbo.sysdatabases
To get the current database name use select db_name().
DB_NAME(Transact-SQL)