Just an example How to create a new database in Microsoft SQL Server by using SQL statement. Before creating, we need to check whether the database is already exited or not.
USE master GO --------------------- -- Create database -- --------------------- IF NOT EXISTS (SELECT * FROM master..sysdatabases WHERE name = N'your_database_name') BEGIN CREATE DATABASE your_database_name END GO |