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

MS SQL 2008 T-SQL 语法出错!求解...
主要错误 0x80040E14,次要错误 26302
> create table flowerInfo(
fid int identity not null ,
fNum varchar(30) not null,
fPicNum int(50) null,
fName text not null,
fInfo text null,
fUsers text null,
fPrice money not null,
fOther text null
)
指定的数据类型无效。 [ Data type (if known) = varchar ]


真的很搞不懂是为什么...我把帮助文档里的代码考进去也是报同样的错!这是为什么呢?

------解决方案--------------------
INT(50) ----??为什么要指定列宽?
INT 就可以了。
------解决方案--------------------
SQL code
create table flowerInfo(
fid int identity not null ,
fNum varchar(30) not null,
fPicNum int null,
fName text not null,
fInfo text null,
fUsers text null,
fPrice money not null,
fOther text null
)

drop table flowerInfo

------解决方案--------------------
fPicNum int(50) null,
int类型不能指定宽度
------解决方案--------------------
fPicNum int null,
这么写
------解决方案--------------------
在 sql2005好像要用nvarchar吧,varchar好像不是内嵌类型吧。
------解决方案--------------------
fPicNum int(50) null????
int后面不需要指定列宽啊