Tuesday, April 26, 2011

Want to get the current Platform in which SQL is running? Easy to do

Easy to do:

create table #SVer(ID int,  Name  sysname, Internal_Value int, Value nvarchar(512))
                        insert #SVer exec master.dbo.xp_msver


SELECT (select Value from #SVer where Name = N'Platform') AS [Platform]

                        drop table #SVer

Results:
Platform
NT INTEL X86

No comments:

Post a Comment