dbTalk Databases Forums  

ALTER TABLE Change TEXT field to VARCHAR

comp.database.ms-sqlserver comp.database.ms-sqlserver


Discuss ALTER TABLE Change TEXT field to VARCHAR in the comp.database.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dcutter
 
Posts: n/a

Default ALTER TABLE Change TEXT field to VARCHAR - 06-09-2006 , 06:47 PM






I have a database with a number of fields (things like postal address)
that were originally (mistakenly) created as TEXT and that only need to
store a few characters. Is it possible to use ALTER TABLE to convert
them to VARCHAR? If I have to I can always add a new column, copy the
data too it, delete the old column and then rename the new, but I am
hoping that there is an easier way.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.