Tech Junkie Blog - Real World Tutorials, Happy Coding!: XML

Latest Posts

Showing posts with label XML. Show all posts
Showing posts with label XML. Show all posts

Sunday, March 22, 2015

There times when you have to store data as XML in a SQL Server database table.  In this blog we will go over how to store XML as data in SQL Server.  There's an xml data type in SQL Server that we can use to store XML data.

Example: Create a database table that contains a column to store XML data using the xml data type
CREATE TABLE Books
(
  Id INT NOT NULL IDENTITY(1,1) PRIMARY KEY,
  Book XML NOT NULL
);

If you look at the "Book" column for the table "Books" you will see that it has a data type of XML

Search This Blog