In version 8 you can also use ServerProperty, I think it was also available in v7
select Serverproperty('Edition')
This will provide output eg: Desktop Engine
The ‘Edition’ serverproperty will return one of the following values
- Desktop Engine
- Developer Edition
- Enterprise Edition
- Enterprise Evaluation Edition
- Personal Edition
- Standard Edition
There are other Serverproperty types eg ProductVersion, ProductLevel and InstanceName... see BOL