add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
SELECT
SERVERPROPERTY ('productversion') AS Product_Version,
CASE
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '8%' THEN 'SQL2000'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '9%' THEN 'SQL2005'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '10.0%' THEN 'SQL2008'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '10.5%' THEN 'SQL2008 R2'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '11%' THEN 'SQL2012'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '12%' THEN 'SQL2014'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '13%' THEN 'SQL2016'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '14%' THEN 'SQL2017'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '15%' THEN 'SQL2019'
ELSE 'unknown' END AS Major_Version,
CASE
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('EditionID')) = '1804890536' THEN 'Enterprise'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('EditionID')) = '1872460670' THEN 'Enterprise Edition: Core-based Licensing'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('EditionID')) = '610778273' THEN 'Enterprise Evaluation'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('EditionID')) = '284895786' THEN 'Business Intelligence'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('EditionID')) = '-2117995310' THEN 'Developer'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('EditionID')) = '-1592396055' THEN 'Express'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('EditionID')) = '-133711905' THEN 'Express with Advanced Services'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('EditionID')) = '-1534726760' THEN 'Standard'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('EditionID')) = '1293598313' THEN 'Web'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('EditionID')) = '1674378470' THEN 'Database SQL o Azure Synapse Analytics'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('EditionID')) = '-1461570097' THEN 'SQL Edge di Azure Developer'
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('EditionID')) = '1994083197' THEN 'SQL Edge di Azure'
ELSE 'unknown' END AS Edition_ID,
CASE SERVERPROPERTY('IsIntegratedSecurityOnly')
WHEN 1 THEN 'Integrated security (Windows Authentication)'
WHEN 0 THEN 'Not integrated security. (Both Windows Authentication and SQL Server Authentication.)'
ELSE 'unknowk' END AS Is_Integrated_Security_Only,
CASE SERVERPROPERTY('EngineEdition')
WHEN 1 THEN 'Personal'
WHEN 2 THEN 'Standard'
WHEN 3 THEN 'Enterprise'
WHEN 4 THEN 'Express'
Product_Version Major_Version Edition_ID Is_Integrated_Security_Only Engine_Edition Is_Clustered Product_Level SQL_Edition Product_Version Build_Clr_Version Machine_Name Resource_Last_UpdateDateTime
15.0.4053.23 SQL2019 Express Not integrated security. (Both Windows Authentication and SQL Server Authentication.) Express Clustered RTM Express Edition (64-bit) 15.0.4053.23 v4.0.30319 dbfiddle-sqlserver 25/07/2020 12:04:59