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