Search code examples
sql-servercommentsvarcharnvarcharntext

Best size of comment - SQL Server


Best length of comment on app is 4000? I want to know standard of social network. How can I show it on SQL Server?

Is it must be nvarchar(?) or varchar(?) or ntext or ...?

Thanks for your help


Solution

  • Maybe it depends.. Facebook comments can be up to 8000 chars. Twitter only 160 (includes twitter space)

    If you are using SQL Server, heard ntext will be deprecated. Some blogs suggest to go with varchar, until and unless you have a very specific business with respect to unicode chars.