|
|
|
SQL Server IF NOT EXISTS (Create Database) ตรวจสอบ Database ก่อนการสร้าง |
|
|
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM sys.databases WHERE name='Sales')
CREATE DATABASE Sales
ON
( NAME = Sales_dat,
FILENAME = 'D:\Database\saledat.mdf',
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH = 5 )
LOG ON
( NAME = 'Sales_log',
FILENAME = 'D:\Database\salelog.ldf',
SIZE = 5MB,
MAXSIZE = 25MB,
FILEGROWTH = 5MB )
GO
|
|
|
|
|
Date :
2012-06-23 07:14:49 |
By :
thaicreate |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|