convert datatype to varcharmax

table1.column1 datatype is text
what are benefits of using varcharmax

how to convert column1 to varcharmax
LVL 1
rgb192Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
vdr1620Connect With a Mentor Commented:
USE Convert or Cast

CONVERT(VARCHAR(Max), ColumnName)

OR

CAST (ColumnNAme as VARCHAR(MAX))

Chck these links to find the differences..Text data type is being depercated in future versions

http://blog.sqlauthority.com/2007/05/26/sql-server-2005-replace-text-with-varcharmax-stop-using-text-ntext-image-data-types/
http://msdn.microsoft.com/en-US/library/ms189087.aspx
0
 
MSSystemsConnect With a Mentor Commented:
In most instances it is never a good idea to use varchar(max). I am sure it could lead to performance degradation in some instances.

I think an expert should give a more in-depth answer, but the obvious thing to me us unnecessary memory allocations.

http://sqlblog.com/blogs/aaron_bertrand/archive/2009/10/09/bad-habits-to-kick-declaring-varchar-without-length.aspx
0
 
rgb192Author Commented:
varchar(max) and text

which is quicker
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
MSSystemsCommented:
varchar(max)
0
 
MSSystemsCommented:
You can not run indexes against ntext
0
 
rgb192Author Commented:
thanks
0
All Courses

From novice to tech pro — start learning today.