AS I need to upgrade number of servers for SharePoint upgrade I need to confirm about the service packs installed so below is the query to see which service and server is installed
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY
('productlevel'), SERVERPROPERTY ('edition')
The result should be
8.00.2039 SP4 Enterprise Edition