4> IF NOT EXISTS (SELECT 'True' FROM INFORMATION_SCHEMA.SCHEMATA WHERE
5> CATALOG_NAME = 'NorthwindCreate')
6> BEGIN
7> CREATE DATABASE NorthwindCreate
8> ON
9> ( NAME = NorthwindCreate,
10> FILENAME = 'c:\NorthwindCreate.mdf' )
11> END
12> ELSE
13> BEGIN
14> PRINT 'Database already exists. Skipping CREATE DATABASE Statement'
15> END
16> GO
|