joeblogs.ie
To check if a database exists, use the DB_ID() function:IF db_id('AdventureWorks') IS NOT NULLPrint 'Database Exists'ELSEPrint 'Database Does Not Exists'
Tags: t-sql
SQL Server
Related posts
Powered by BlogEngine.NET 1.5.0.7 Theme by Mads Kristensen