我有一张只有一行的表,当我使用SP_SpaceUsed N''时,它给出的数据是16 KB。而当我使用dataLength时,比如:
select ClientID , (0 + isnull(datalength(ClientID), 1) + isnull(datalength(LeadID), 1) + isnull(datalength(Company_Name), 1) + isnull(datalength(Website), 1) + isnull(datalength(EmployeeCount), 1) + isnull(datalength(Revenue), 1) + isnull(datalength(Address), 1) + isnull(datalength(City), 1) + isnull(datalength(State), 1) + isnull(datalength(ZipCode), 1) + isnull(datalength(CountryID), 1) + isnull(datalength(Phone), 1) + isnull(datalength(Fax), 1) + isnull(datalength(TimeZone), 1) + isnull(datalength(SicNo), 1) + isnull(datalength(SicDesc), 1) + isnull(datalength(ResearchAnalysis), 1) + isnull(datalength(SourceID), 1) + isnull(datalength(BasketID), 1) + isnull(datalength(PipelineStatusID), 1) + isnull(datalength(SurveryID), 1) + isnull(datalength(NextCallDt), 1) + isnull(datalength(CurrentRecStatus), 1) + isnull(datalength(AssignedUserID), 1) + isnull(datalength(AssignedDate), 1) + isnull(datalength(TotValueAmt), 1) + isnull(datalength(Remove), 1) + isnull(datalength(Release), 1) + isnull(datalength(LegendID), 1) + isnull(datalength(Inserted_Date), 1) + isnull(datalength(Inserted_By), 1) + isnull(datalength(Updated_Date), 1) + isnull(datalength(Updated_By), 1)) as rowsize from TempLeadHeader order by rowsize desc
它给出的rowsize是167,我猜这是以字节为单位的。我想知道为什么会有这样的结果差异。
提前感谢您。
select ClientID , (0 + isnull(datalength(ClientID), 1) + isnull(datalength(LeadID), 1) + isnull(datalength(Company_Name), 1) + isnull(datalength(Website), 1) + isnull(datalength(EmployeeCount), 1) + isnull(datalength(Revenue), 1) + isnull(datalength(Address), 1) + isnull(datalength(City), 1) + isnull(datalength(State), 1) + isnull(datalength(ZipCode), 1) + isnull(datalength(CountryID), 1) + isnull(datalength(Phone), 1) + isnull(datalength(Fax), 1) + isnull(datalength(TimeZone), 1) + isnull(datalength(SicNo), 1) + isnull(datalength(SicDesc), 1) + isnull(datalength(ResearchAnalysis), 1) + isnull(datalength(SourceID), 1) + isnull(datalength(BasketID), 1) + isnull(datalength(PipelineStatusID), 1) + isnull(datalength(SurveryID), 1) + isnull(datalength(NextCallDt), 1) + isnull(datalength(CurrentRecStatus), 1) + isnull(datalength(AssignedUserID), 1) + isnull(datalength(AssignedDate), 1) + isnull(datalength(TotValueAmt), 1) + isnull(datalength(Remove), 1) + isnull(datalength(Release), 1) + isnull(datalength(LegendID), 1) + isnull(datalength(Inserted_Date), 1) + isnull(datalength(Inserted_By), 1) + isnull(datalength(Updated_Date), 1) + isnull(datalength(Updated_By), 1)) as rowsize from TempLeadHeader order by rowsize desc
它给出的rowsize是167,我猜这是以字节为单位的。我想知道为什么会有这样的结果差异。
提前感谢您。