Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • the problem with varchar is the limit of x bytes, which is not the case for xml. Commented Jan 5, 2011 at 15:53
  • 3
    Which version of SQL Are you using. nvarchar(max) should offer you up to 2GB. Commented Jan 5, 2011 at 16:02
  • after a quick search , there is a difference between specifying varchar(5000) and varchar(max) Commented Jan 5, 2011 at 19:31
  • 1
    Neither CAST() or CONVERT() will properly unescape the xml. The handling of converting to a NULL when there's no matching tag on a nodeset query function also fails. Commented Nov 3, 2014 at 23:08