Using varchar (MAX) or varbinary (MAX) to store a string of length undefined in SQL Server

I do CMS, and of course he will have a blog. So this might be a pretty empty question, but from a database optimization perspective would you use varchar (max) or varbinary (max) to store the body of a blog post?

+3
source share
1 answer

I would use it myself NVarChar(MAX)to account for Unicode; but you can use VarChar(MAX)it if you don’t need Unicode. VarBinarythere will be more if you have non-text data. You can also use Textor NText, but they have been deprecated since sql2005 was created.

+7
source

Source: https://habr.com/ru/post/1768654/


All Articles