Execute:
SELECT name FROM master.sys.databases
This the preferred approach now, rather than dbo.sysdatabases
, which has been deprecated for some time.
Execute this query:
SELECT name FROM master.dbo.sysdatabases
or if you prefer
EXEC sp_databases
More Related Contents:
- How can foreign key constraints be temporarily disabled using T-SQL?
- Does T-SQL have an aggregate function to concatenate strings? [duplicate]
- How to add Active Directory user group as login in SQL Server
- How to create materialized views in SQL Server?
- How do I format a number with commas in T-SQL?
- Combine two tables that have no common fields
- Is it possible to use Full Text Search (FTS) with LINQ?
- How to set a default value for an existing column
- Need a datetime column in SQL Server that automatically updates when the record is modified
- how to make your data horizontal
- How do I find a stored procedure containing ?
- Error: TCP Provider: Error code 0x2746. During the Sql setup in linux through terminal
- SQL Server: Database stuck in “Restoring” state
- How to check if a Constraint exists in Sql server?
- Access is denied when attaching a database
- Getting an odd error, SQL Server query using `WITH` clause
- An attempt to login using SQL authentication failed
- What does “ORDER BY (SELECT NULL)” mean?
- Calling stored procedure using VBA
- Split one column into multiple rows
- SQL Unique constraint across multiple tables
- How to find SQL Server running port?
- Changing SQL Server collation to case insensitive from case sensitive?
- SQLServer IDENTITY Column with text
- Why SQL Server DATETIME type saves time in ticks of 1/300 of a sec?
- How to store directory / hierarchy / tree structure in the database?
- Cannot bulk load. Operating system error code 5 (Access is denied.)
- Which is quicker COALESCE OR ISNULL?
- Merge multiple rows into a single row
- Does query plan optimizer works well with joined/filtered table-valued functions?