Re: Change Data Type
From: Russell Fields (RussellFields_at_NoMailPlease.Com)
Date: 05/06/04
- Next message: AshleyT: "Can't find sql 2000 CD for named instance"
- Previous message: Paul: "Change Data Type"
- In reply to: Paul: "Change Data Type"
- Next in thread: Julie: "Re: Change Data Type"
- Reply: Julie: "Re: Change Data Type"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 6 May 2004 16:44:59 -0400
Paul,
The issues with varchar and nvarchar are fairly straight-forward, however
ALTER TABLE cannot change texts and ntexts. I understand that you must drop
any indexes on a varchar that you are changing to nvarchar before doing the
alter. One of the other main restrictions is that the data must all fit
into the new target. The BOL explains most of this in the ALTER TABLE
topic.
You might also find the following article from SQL Server magazine helpful.
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnsqlmag04/html/InsideALTERTABLE.asp
Russell Fields
"Paul" <paul@gotheta.com> wrote in message
news:uJjE5d6MEHA.1340@TK2MSFTNGP12.phx.gbl...
> Hi,
> I am not sure if I am posting to the correct group, but I am wondering if
> there are any dangers in changing datatypes on a column.
> More specifically, I want to change some varchars to nvarchars and texts
to
> ntexts. I already have the script written for the columns I need to
change.
> I have seen no issues in doing this on my test database, but I was
wondering
> if there are any inherent dangers in doing this.
> Are there any articles that can be helpful for this subject?
>
> Thank you,
> Paul
>
>
- Next message: AshleyT: "Can't find sql 2000 CD for named instance"
- Previous message: Paul: "Change Data Type"
- In reply to: Paul: "Change Data Type"
- Next in thread: Julie: "Re: Change Data Type"
- Reply: Julie: "Re: Change Data Type"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|