2017-03-07 33 views
1

我的表有一個稱爲不能指定數據類型的文本列寬

消息2716錯誤,級別16,狀態1,行1列,參數或變量#8: 不能指定列的寬度在數據類型文本上。

,我沒有看到的問題。

繼承人查詢:

create table tblAdd (
OfficeType nchar not null, 
OfficeName varchar (24) not null, 
AssetClassification varchar (24) not null, 
AssetSubClass varchar(24) not null, 
UACSObjectCode int primary key not null, 
AssetItem varchar (24) not null, 
Manufacturer varchar(24) not null, 
Model text (24) not null, 
SerialNumber text (24) not null, 
Specification text (24) not null, 
PropertyNumber text (24) not null, 
CurrentCondition text (24) not null, 
SourceOfFund varchar (24) not null, 
CostOfAcquisition money not null, 
DateIfAcquisition date not null, 
EstimatedTotalLifeYears int not null, 
NameOfAccountableOffice varchar (24) not null, 
AssetLocation varchar (24) not null, 
Remarks text (24) not null 

回答

1

你有沒有看數據類型是什麼文本?
這是一個傳統的CLOB字段,它允許2GB數據。

我想你想VARCHAR(最大值)它取代,因爲SQL Server 2005的

文本在其他意見

  • 「OfficeType的nchar」 將默認爲一個字符。
  • 都是你提起意思是VARCHAR(24)?
+0

現在我才明白,文本數據類型有最大長度哈哈哈感謝的默認:* – XxYzZ

相關問題