Here is the T-SQL code for checking to create if the database exists. This code below drops the database and creates new.
-- Changed database context to 'master'USE masterGO-- Check ExistsIF EXISTS(SELECT name FROM sys.databasesWHERE name = 'Angel83')DROP DATABASE Angel83GO-- Create DatabaseCREATE DATABASE Angel83GO
No comments:
Post a Comment