Lesson 27. Working with XML and JSON

In this lesson, you learn how to generate well-formed XML from relational data. You also learn about the XML datatype and how it is used.

Using SQL Server XML Support

XML has become a standard mechanism by which to exchange, distribute, and persist data. Although SQL Server is a relational DBMS, and relational data is very different from hierarchical XML data, there are often compelling reasons to obtain SQL Server data as XML, and to store XML data within SQL Server tables.

Here are the three primary areas of interest concerning SQL Server’s XML support:

Image Using SELECT to retrieve data, returning it as well-formed ...

Get Sams Teach Yourself Microsoft® SQL Server T-SQL in 10 Minutes, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.