There are two statements:
Select @ versiongo
Selectserverproperty ('productversion') as productversion, serverproperty ('productlevel') as productlevel, serverproperty ('version') as edition, serverproperty ('engineedition ') as engineedition; go
The following message is returned when you run the first entry: Microsoft SQL Server 2005-9.00.3042.00 (x64) Feb 10 2007 00:59:02 copyright (c) 1988-2005 Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.0 (build 6001: Service Pack 1)
The following message is returned when the second message is run: 9.00.3042.00 SP2 Standard Edition (64-bit)
Note: The query result depends on the version of SQL Server Management studio in which you execute the statement.
For example, if you connect to an instance of SQL Server 2008 in ssms2005, the result of executing the preceding statement is still displayed as the version 2005.
Of course, you can also connect to the SQL instance and right-click to view the information.