sql server list of databases code example
Example 1: show sql server database
EXEC sp_databases
Example 2: show databases in sql server
SELECT name FROM master.SYS.DATABASES
EXEC sp_databases
SELECT name FROM master.SYS.DATABASES