list on sql database code example
Example 1: get database list in sql server
SELECT name FROM master.dbo.sysdatabases
Example 2: show databases in sql server
EXEC SP_DATABASES
SELECT name FROM master.dbo.sysdatabases
EXEC SP_DATABASES