SERVERPROPERTY
catalog lookup
What changes
- Input
- catalog metadata (object, column, index, file, database properties)
- Output or change
- id, name or property value
- Return type
- sql_variant
Syntax at a glance
SERVERPROPERTY ( 'propertyname' )
Work example
Inspect a documented instance property such as version or edition.
Use schema-qualified names and test missing and permission-hidden objects separately.
Check your work Different properties return different types, so check the requested property contract.
Open Microsoft Learn for full syntax, permissions, and details for your version.