SQL Server Express 2016 / 2017

SQL 2016/2017 JSON Features

Why do you want JSON features in SQL 2016/2017?

A lot of data in the SambaPOS Database is stored in JSON format. Dealing with JSON in SQL Queries in earlier versions of SQL Server was very difficult. With SQL Server 2016/2017, several features were added to make dealing with JSON data much easier. You might not think you need to use these features now, but enabling support for JSON is very simple.

:bulb: TIP: More and more Tutorials and DB Tools files contain SQL code that relies on the JSON features in SQL Server 2016/2017. So if you follow a Tutorial or install a DB Tools file and it does not seem to work properly, you should check to make sure you have enabled the JSON features of SQL Server 2016/2017 for your Database.


Enabling JSON Features

To enable new JSON support in SQL 2016/2017, you need to verify the Compatibility Level of your Database, and change it if it is not set to SQL Server 2016 (130) (or SQL Server 2017 (140)). An upgrade from a previous version will probably have the Compatibility Level set to a lower value (ie. SQL Server 2014 (120)), so you will need to change it. A new installation or DB will probably already have the Compatibility Level set to SQL Server 2016 (130) (or SQL Server 2017 (140)), but you should verify this anyway.

The easiest way to check and set the Compatibility Level is by using SSMS …

4 Likes