SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')
 

SQL Server 2008

10.0.1600.22
RTM
Enterprise Edition

 

SQL Server 2005

9.00.1399.06
RTM
Enterprise Edition