问一个SQL SERVER 的全局变量 @@microsoftversion 
顺便帮忙看一下下面的语句,解释一下,谢谢:
if( ( (@@microsoftversion / power(2, 24) = 8) and (@@microsoftversion & 0xffff >= 724) ) or ( (@@microsoftversion / power(2, 24) = 7) and (@@microsoftversion & 0xffff >= 1082) ) ) 
exec sp_dboption N'dd_temp', N'db chaining', N'false' 
GO 

解决方案 »

  1.   

    @@MICROSOFTVERSION
    System function returning an internal tracking number used by Microsoft for the SQL Server version of the database engine.
      

  2.   

    select @@microsoftversion,@@microsoftversion & 0xffff select @@version---------------
    比较一下就知道了
      

  3.   

    SELECT CONVERT(varbinary,@@MicrosoftVersion)the first two digits after the '0x0' will tell you the release60 = SQL Server 6.0 
    65 = SQL Server 6.5 
    70 = SQL Server 7.0 
    80 = SQL Server 2000 
    90 = SQL Server 2005 
      

  4.   

    select @@microsoftversion / power(2, 24),@@microsoftversion & 0xffff 
    select @@version
    ---------------
    比较一下就知道了