Skip to content

SQL Server: translate Contains over JSON primitive collections to the new JSON_CONTAINS() #36656

@roji

Description

@roji

https://learn.microsoft.com/en-us/sql/t-sql/functions/json-contains-transact-sql?view=sql-server-ver17

At the time of writing, the json type isn't supported as a search value in JSON_CONTAINS() (see limitations in doc page above), so we can't support structural collections.

Note also that JSON_CONTAINS doesn't (currently) support searching for nulls. As a result, we can only translate when either the item or the collection's elements are non-nullable.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions