SELECT VM_type = CASE virtual_machine_type
WHEN 0 THEN 'None'
WHEN 1 THEN 'Hypervisor'
WHEN 2 THEN 'Other'
ELSE 'Error'
END,
FROM sys.dm_os_sys_info;
GO
Both of the following syntaxes are valid for Oracle...
SELECT CASE dc.constraint_type
WHEN 'U' THEN 'Unique Key'
WHEN 'P' THEN 'Primary Key'
WHEN 'R' THEN 'Referential'
ELSE dc.constraint_type
END AS contraint_type
FROM dba_constraints dc
SELECT CASE
WHEN dc.constraint_type = 'U' THEN 'Unique Key'
WHEN dc.constraint_type = 'P' THEN 'Primary Key'
WHEN dc.constraint_type = 'R' THEN 'Referential'
ELSE dc.constraint_type
END AS contraint_type
FROM dba_constraints dc