I have the following table in a SQL Server 2008 database with lots of long varchar fields for text descriptions. I want to know what is the best datatype to use for these. Currently I'm using varchar with 2000 character limit but this might cause problems if people need to add more text. Is there a problem using TEXT more than once in a table? What do you suggest?
Table
name varchar(250)
description1 varchar(2000)
description2 varchar(2000)
description3 varchar(2000)
description4 varchar(2000)
description5 varchar(2000)
For SQL Server 2008, I believe the recommended practice is to use varchar(max) rather than text - text is to be deprecated, I believe, in a future SQL Server edition.
Your table design seems sound enough to me, but I suspect some will suggest that if the columns are filled to the max - and the table row count is large - then there might be some performance issues. SQL Server can only store 8K per database page, so it would have to split our your table - which has a performance impact.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With