From the course: SQL Server 2014 Essential Training
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Storing XML - SQL Server Tutorial
From the course: SQL Server 2014 Essential Training
Storing XML
- In this section, we're going to talk about storing XML in a SQL server table. In the previous exercise we created a table called xmlTest. It has three Columns, one that's going to store untyped XML, in other words, XML that is not evaluated against any set of rules, then one column called typed, which will store XML that is validated against a test schema, and then one column called justText, which is not designed necessarily to store XML, it will store any type of text. I staged some code for you to do an insert, so if you want to copy that over from your exercise files, take all of it and copy it into a new query, and then let's talk about it. The first line says INSERT INTO, that's our standard syntax for inserting new rows. Then line two has the name of the table, and the name of the columns we're going to insert into, and then the rest of it is the values. I'm taking the exact same XML and inserting it into all three columns. It is valid XML, it does meet the rules of our…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.