2

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

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Mohi
  • 25
  • 1
  • 1
  • 7
  • 1
    I have no idea how anyone could possibly answer this. It's going to be highly dependent on the specific application you are building. There will be trade-offs that you need to understand and to choose the best approach for your particular application. You can look at the StackOverflow data model but that may or may not be the set of trade-offs that you want to make – Justin Cave Sep 22 '16 at 21:24
  • `ntext`, `text`, and `image` data types will be removed in a future version of SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use `nvarchar(max)`, `varchar(max)`, and `varbinary(max)` instead. [See details here](http://msdn.microsoft.com/en-us/library/ms187993.aspx) – marc_s Sep 22 '16 at 21:28
  • @marc_s yes and thanks – Mohi Sep 22 '16 at 21:37
  • @JustinCave okay thanks – Mohi Sep 22 '16 at 21:39

1 Answers1

0

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.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Pavan Chandaka
  • 11,671
  • 5
  • 26
  • 34
  • I highly recommended to consider **n**varchar(*whatever*) more details here http://stackoverflow.com/questions/144283/what-is-the-difference-between-varchar-and-nvarchar – Pavel Kovalev Sep 23 '16 at 03:46
  • @PavelKovalev add a answer , I can mark your answer – Mohi Sep 23 '16 at 05:49
  • @Mohi your question was put on hold so it is not possible to add an answer. But I appreciate if you vote for my comment – Pavel Kovalev Sep 23 '16 at 17:59