How can I get all the database names in a sql server instance using tsql? August 5, 2023 by Tarik SELECT * FROM sys.databases