how to get a database in sql server code example Example: get database list in sql server SELECT name FROM master.dbo.sysdatabases