0

Searched the Web, but didn't find a clear answer to the question.

Let's say I have an element and there's no maxLength property defined:

<xs:element name="Name" type="xs:string">
</xs:element>

Should this element map to nvarchar(MAX) SQL data type?

Reed
  • 1,161
  • 13
  • 25
  • Is this data going directly into your database (if so, why not into an `xml` column)? If not, what's doing the *processing* and what limitations does that apply? – Damien_The_Unbeliever Feb 18 '19 at 08:02
  • Thanks for answer. No, the data isn't going directly into the database. Let's say I just remove the white-spaces on the sides. – Reed Feb 18 '19 at 08:14
  • 2
    So, if you're doing that in e.g. [tag:c#] then that already imposes a [2GB limit](https://stackoverflow.com/questions/140468/what-is-the-maximum-possible-length-of-a-net-string) so `nvarchar(max)` seems reasonable. – Damien_The_Unbeliever Feb 18 '19 at 08:57

0 Answers0