How to replace ntext with nvarchar(MAX)?

Discussion in 'MySQL' started by cassinii, Jun 9, 2010.

  1. #1
    I need a column that can hold large texts in Unicode. The ntext data type is deprecated so I have to use nvarchar instead. The current column is of data type text so I tried to change it like this:

    alter table tableName change currentColumn newColumn nvarchar(MAX);

    This doesn't work. When I replace MAX with numbers it works but I don't know what is the maximum number I can replace it with. I am going to store really large texts.
    How can I make this work?
     
    cassinii, Jun 9, 2010 IP
  2. sketchx

    sketchx Member

    Messages:
    97
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #2
    Which version of SQLServer are you using?
     
    sketchx, Jun 10, 2010 IP
  3. sketchx

    sketchx Member

    Messages:
    97
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    I found a good description that will probably answer your question:

    Source: teratrax.com

    So if your not using SQLServer2005, it is probably the problem.
     
    Last edited: Jun 10, 2010
    sketchx, Jun 10, 2010 IP