Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Should I use varchar(max) or text?

Author  Topic 

Eagle_f90
Constraint Violating Yak Guru

424 Posts

Posted - 2011-08-29 : 19:36:13
I have a column to store movie/game synopis and when I orginaly made it I set it as varchar(MAX) but the more I think on it it seems TEXT would work too but when I looked it up in my basic SQL book it made it seem like TEXT and VARCHAR(MAX) are equals. As I see my self storing larger block of info into the DB i figured i should figure it out now, when do you use TEXT over VARCHAR(MAX)?

--
If I get used to envying others...
Those things about my self I pride will slowly fade away.
-Stellvia

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-08-29 : 19:48:42
Definitely do not use text as it's deprecated. From BOL:

quote:

ntext, text, and image data types will be removed in a future version of Microsoft 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.



Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -