SQL Flow Field Guide

CONNECTIONPROPERTY

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

system function

What changes

Input
arguments or engine/session state
Output or change
value

Syntax at a glance

CONNECTIONPROPERTY ( property )

Work example

Inspect a documented property of the current network connection.

Read state in the intended scope and immediately after the statement it describes. Treat host values as untrusted.

Check your work Treat client endpoint data as diagnostic rather than trusted identity.

Open Microsoft Learn for full syntax, permissions, and details for your version.