O'Reilly logo

SQL Server Advanced Data Types: JSON, XML, and Beyond by Peter A. Carter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Peter A. Carter  2018
Peter A. CarterSQL Server Advanced Data Typeshttps://doi.org/10.1007/978-1-4842-3901-8_9

9. Working with the JSON Data Type

Peter A. Carter1 
(1)
London, UK
 

In this chapter, I will discuss the T-SQL functions that allow developers to query JSON data. I will then discuss how JSON data can be indexed.

Querying JSON Data

SQL Server has introduced the JSON_VALUE(), JSON_QUERY(), JSON_MODIFY(), and ISJSON() functions to help developers interrogate and interact with JSON data. The following sections will discuss each of these functions.

Using ISJSON( )

Because JSON data is stored in NVARCHAR(MAX) columns , as opposed to using its own data type, it is very useful to ensure that a tuple contains a valid JSON document, before calling a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required