SQL Flow Field Guide

JSON_PATH_EXISTS

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

path existence test

What changes

Input
JSON text and path
Output or change
1/0
Return type
Returns an int value of 1 or 0 or NULL. Returns NULL if the value_expression or input is a SQL NULL value. Returns 1 if the given SQL/JSON path exists in the input or returns a non-empty sequence. Ret

Syntax at a glance

JSON_PATH_EXISTS( value_expression , sql_json_path )

Work example

Check whether a JSON path exists without extracting its value.

Use it for path presence and validate the property's type separately when the schema requires it.

Check your work A present path does not prove that its value is valid for the business rule.

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