我的版本:
Microsoft SQL Server 2000 - 8.00.194 (Intel X86) Aug 6 2000 00:57:48 Copyright (c) 1988-2000 Microsoft Corporation Personal Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
情况与楼主一样
EXEC sp_configure 'allow updates',1 RECONFIGURE WITH OVERRIDE
-- select collation,collationid from dbo.syscolumns
update dbo.syscolumns set collationid=65572 where collationid=53284
EXEC sp_configure 'allow updates',0 RECONFIGURE WITH OVERRIDE
go
终于找到了两台机器,版本都是:
Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows NT 5.0
(Build 2195: Service Pack 4)
测试,字符串长度结果如下:
select len(cast(N'我们' as varbinary(10)) + 0x0000 + cast(N'大家' as varbinary(10))) --8
select len(cast(N'我们' as varbinary(10))) --3
select len(ltrim(rtrim(cast(N'我们' as varbinary(10)) + 0x0000 + cast(N'大家' as varbinary(10))))) --8
select len(cast(cast(N'我们' as varbinary(10)) + 0x0000 + cast(N'大家' as varbinary(10)) as nvarchar)) --5
select len(cast(cast(N'我们' as varbinary(10)) as nvarchar)) --2
select len(ltrim(rtrim(cast(cast(N'我们' as varbinary(10)) + 0x0000 + cast(N'大家' as varbinary(10)) as nvarchar)))) --5
Microsoft SQL Server 2000 - 8.00.194 (Intel X86)
Aug 6 2000 00:57:48
Copyright (c) 1988-2000 Microsoft Corporation
Personal Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Developer Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
(1 row(s) affected)
select @@version 后我的版本信息
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Microsoft SQL Server 2000 - 8.00.818 (Intel X86)
May 31 2003 16:08:15
Copyright (c) 1988-2003 Microsoft Corporation
Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)