Defining and Using xml
Columns
You can add columns of type xml
to any table by using a familiar Data Definition Language (DDL) syntax, with a few new twists. Much like their relational counterparts, xml
columns, parameters, and variables may contain null or non-null values.
The following snippet shows the DDL used to create the table HumanResources.JobCandidate
from AdventureWorks2008
. The column you are concerned with is Resume
:
When you are defining objects of type xml
, either of two facets may be applied:
• CONTENT
—This facet specifies that well-formed XML documents as well as fragments may be inserted into the xml
column or variable. (CONTENT ...
Get Microsoft® SQL Server 2008 R2 Unleashed 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.