what are the best practices for storing html in database ( if at all )? should it be stored as html ( in a varchar max field ) or converted to xml ( in which case how should the conversion be handled )? thanks
asked Mar 31 '10 at 08:01 PM in Default
If you really must store HTML then store it as HTML in a varchar(max). If you store it as XML then as you say something somewhere needs to convert it, and I doubt you would be using any of the XML support in SQL.
In the past I have stored raw HTML (and compressed HTML) in varchar(max).
If it's not real data, then just think of it as a piece of data, and you just need a datatype big enough to store it.
answered Mar 31 '10 at 08:07 PM
Kev Riley ♦♦