use master; /* -- define DB name */ declare @database_name nvarchar( max ); set @database_name = 'framework'; /* -- check if DB exists yet */ if db_id( @database_name ) is not null begin print 'DB exists.'; /* db exists -> end */ return; end; ...
Microsoft AX 2012, X++, C#, SQL server, SSRS, Java, JavaFX, Oracle, PL/SQL, Delphi - codes examples, step-by-step tutorials, experiences.
Monday, December 11, 2017
SQL SERVER - How check if database exists
Use this script code:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment