Using system table: databases : databases « Database « SQL Server / T-SQL






Using system table: databases


1> DECLARE @DBName nvarchar(128)
2> DECLARE @TBLName nvarchar(128)
3> SET @DBName = N'Northwind'
4> SET @TBLName = N'Shippers'
5>
6> SELECT name
7> FROM sys.databases
8> WHERE name = @DBName
9> GO
           
       








Related examples in the same category

1.Query is_auto_close_on FROM sys.databases