Search code examples
sql-server-2008sqldatatypes

How to change the type of a column?


I have a table in SQL SERVER that has several columns. One of this column had type: VARCHAR(1000). But I want to change it to VARCHAR(MAX). How to I do this with execute a query?


Solution

  • You can use something like:

    ALTER TABLE [table] ALTER COLUMN [column] VARCHAR(MAX)