日期:2014-05-18  浏览次数:20535 次

新手求帮助
sql2005创建数据库遇到问题。。
SQL code

create database db1
on primary
(
name = db1_p01, 
filename = 'F:\\db\db1_p01.mdf',
size = 5mb, 
maxsize = unlimited, 
filegrowth = 1mb,
)

filegroup db1_g01
(
name = db1_g01_01,
filename = 'F:\\db\db1_g01_01.ndf',
size = 10mb,
maxsize = 100mb,
filegrowth = 50%
)
Msg 102, Level 15, State 1, Line 9
')' 附近有语法错误。


哪错了啊。



------解决方案--------------------
SQL code
create database db1
on primary
(
name = db1_p01, 
filename = 'F:\\db\db1_p01.mdf',
size = 5mb, 
maxsize = unlimited, 
filegrowth = 1mb--这里多一逗号
)

------解决方案--------------------
SQL code

create database db1
on primary
(
name = db1_p01, 
filename = 'F:\db\db1_p01.mdf',
size = 5mb, 
maxsize = unlimited, 
filegrowth = 1mb
),
filegroup db1_g01
(
name = db1_g01_01,
filename = 'F:\db\db1_g01_01.ndf',
size = 10mb,
maxsize = 100mb,
filegrowth = 50%
)