SQL Alter Table Alter Column SQL Server Management 

When you have to alter a table that was inherited by you from the 90's or you're finally updating that old Access DB. 

 

For some of you this will be a blessing. 

USE [DATABASE_NAME]
GO

/****** Object: Table [dbo].[TABLE_NAME] Script Date: 05/05/2014 19:19:10 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

ALTER TABLE [dbo].[TABLE_NAME] ALTER COLUMN [COLUMN_NAME] [nvarchar](MAX)

GO
UPDATE [dbo].[TABLE_NAME] set [COLUMN_NAME] = [COLUMN_NAME]

GO

 

You don't have to believe me: 

http://stackoverflow.com/questions/4708463/converting-ntext-to-nvcharmaxmax-getting-around-size-limitation

I just updated 5 SQL sites in 30 minutes because ... I read and confirmed that StackOverflow.com is first in my book. 

I knew it was something like that but seeing others discuss it and finalize it for me to test on an old SQL 2000 server I just migrated was awesome. 

Thanks StackOverflow.Com .. 

SQL Alter Table Alter Column SQL Server Management Once again, something from years ago pops up and spanks your rear. Lucky for us we have StackOverflow.com as a resource to confirm what we either didn't know or we had doubt about. In my case, I just couldn't find my old SQL book to show how to spell "Alter" ha ha ha.. just kidding. The reason I looked up the migration process was I needed to know just how much data if any I was going to truncate or hack off. Not a byte and I can say some of my over 2,000 nText fields had 26 pages of word docs published. Wow, so cool... I'll check back if anything did get cut, hacked or chopped off.