What is the earliest Microsoft SQL-Server version having the T-SQL OPENJSON function?

As far as I could see before asking this question, the Microsoft manual shows the function's documentation for any version. Interestingly, the version selector reverts to to SQL Server 2017, which could be indicative of something or nothing at all.

This other page mentions the same function but in relation to a SQL Server 2016 demo.


As per the documentation the OPENJSON command requires compatibility mode 130 - this is SQL Server 2016

In this case this means that the feature was introduced in SQL Server 2016, and can only be used in databases where the Compatibility model is set to 130 (SQL Server 2016) or higher.

Compatibility levels are tied to a specific SQL Server version and are listed at ALTER DATABASE (Transact-SQL) Compatibility Level.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.