From the course: Microsoft SQL Server 2016 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Storing XML

Storing XML - SQL Server Tutorial

From the course: Microsoft SQL Server 2016 Essential Training

Start my 1-month free trial

Storing XML

- [Instructor] In this section we're going to use SQL Server 2016 to store some XML data. I'm going to create a new table to do this. So in Demo Database 02 I'll right click and go to New Table. The first column I'm going to call untyped. The Data Type for this column will be XML. We'll use it to store XML that is not validated against any set of rules. That is called untyped XML. The next column we'll call typed. And that will be used to store XML that is validated against the schema we created previously. So for Data Type I'll put XML again. And then in the bottom half of the screen, with the column properties, I'll expand the section called XML Type Specification. And next to Schema Collection, there's a drop down where I can select testSchema1, which we created previously. And the last column I'll create will be called justText. And for this column, we'll use the varchar Data Type and I'll make it a lift of one thousand. For this last column, justText, although we're going to…

Contents