If I have a column for notes/comments in a table, what is an appropriate way / is there a way to store a limited number of characters (say 600) while still allowing for unlimited HTML style markup?
The only way I could think of is to enforce the limit at the backend but I'm concerned it might not be enough.
1条答案
按热度按时间u3r8eeie1#
If your HTML is really (X)HTML, it is possible to use SQL Server XML data type and built-in XQuery language capabilities.
XQuery allows to retrieve textual data only excluding HTML tags.
Even embedded CSS
<style>...</style>
could be easily taken out of the equation.SQL
Output