开发者

Does TEXT in MySQL retain spaces/formatting for XML?

If I embed XML into a TEXT column in MySQL, will it retain the spacing/indentation of the XML blob? Will I need to fix the开发者_C百科 markup when I retrieve it so it isn't just a long string?


Per the docs, the text you put in will stay untouched (except for possible truncation if you try to put more text in than the datatype can accept). Indeed, there are few differences with VARCHAR: no DEFAULT value, and, if you put an index on a TEXT column, you must specify the prefix length, which is only optional for VARCHAR.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜