MattDavies51
Programmer
From a stored procedure, I am looking at the best way of determining whether another database exists on that same server.
e.g. Say I'm executing a stored proc in the EngDatabase, and want to discover if a GerDatabase exists I want something like:
if exists(GerDatabase)
begin
...
else
...
I have come across the sp_databases stored proc in the Master DB, but it's not exactly what I am after.
Any help will be greatly appreciated.
Matt
e.g. Say I'm executing a stored proc in the EngDatabase, and want to discover if a GerDatabase exists I want something like:
if exists(GerDatabase)
begin
...
else
...
I have come across the sp_databases stored proc in the Master DB, but it's not exactly what I am after.
Any help will be greatly appreciated.
Matt