Check if a database exists on a server

Here is some code to use to check if a database exists.
Just replace the string 'DATABASE NAME’.

SELECT * FROM [master].[sys].[databases] WHERE name='DATABASE NAME'

posted @ Monday, November 11, 2013 4:11 PM


Comments on this entry:

No comments posted yet.

Your comment:

 (will not be displayed)

Please add 4 and 4 and type the answer here:

Live Comment Preview: