• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 311
  • Last Modified:

convert datatype to varcharmax

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

how to convert column1 to varcharmax
0
rgb192
Asked:
rgb192
  • 3
  • 2
2 Solutions
 
vdr1620Commented:
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
 
MSSystemsCommented:
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
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
MSSystemsCommented:
varchar(max)
0
 
MSSystemsCommented:
You can not run indexes against ntext
0
 
rgb192Author Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now