SQL Server创建数据库的命令是基本的SQL命令,下面就为您介绍SQL Server创建数据库的命令,希望对您能有所帮助。
SQL Server创建数据库命令:
- -- =============================================
- -- Basic Create Database Template
- -- =============================================
- IF EXISTS (SELECT *
- FROM master..sysdatabases
- WHERE name = N'suntest')
- DROP DATABASE suntest
- GO
- CREATE DATABASE suntest
- on
- primary
- (
- name = suntest_data,
- filename = 'e:\suntest_data.mdf',
- size = 3,
- maxsize = 10,
- filegrowth = 10%
- ),
- filegroup newgroup1
- (
- name = suntest_data,
- filename = 'e:\suntest_data.mdf',
- size = 3,
- maxsize = 10,
- filegrowth = 1
- )
- log on
- (
- name=suntest_log,
- filename='e:\suntest_log.mdf',
- size=1,
- maxsize=6,
- filegrowth=1
- )
- GO
以上就是SQL Server创建数据库的命令介绍。
【编辑推荐】