title: Change column type from ntext to varbinary(max)
body: <p>I have a table that has <code>ntext</code> field. <a href="http://msdn.microsoft.com/en-us/library/ms187993.aspx" rel="noreferrer">MSDN</a> says that <code>ntext</code> is deprecated and they suggest other data types:</p>
  
  <blockquote>
    <p>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. </p>
  </blockquote>
  
  <p>In my particular case it was decided to switch to <code>varbinary(max)</code>. I tried to alter the table definition but that didn't work.</p>
  
  <pre><code>ALTER TABLE MyTable ALTER COLUMN MyColumn VARBINARY(MAX);
  </code></pre>
  
  <p><strong>What are the possibilities to change the type to <code>varbinary(max)</code>?</strong> I tried change the type from <code>ntext</code> -> <code>nvarchar(max)</code> and then from <code>nvarchar(max)</code> -> <code>varbinary(max)</code> but that is not possible (error: Implicit conversion from data type nvarchar(max) to varbinary(max) is not allowed).</p>
  
  <p>The only working solution is to add a new column of type <code>varbinary(max)</code>, convert the existing value to the new column and then drop the old column. This takes WAY TOO MUCH time (on my dataset of about 15GB it takes about 30 minutes). That's why I am investigating other possibilities to achieve the same (possibly in-place = without moving data and conversion).</p>