Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing Char to Varchar Datatype
Message
From
11/08/2006 22:26:37
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Changing Char to Varchar Datatype
Miscellaneous
Thread ID:
01145012
Message ID:
01145012
Views:
92
Hi Guys,

I have a table that has a large amount of data. Most of the columns in the table have char data type. I want to change the char data type to varchar in order to save some disc space.

I tried using Alter Table alter column field1 Varchar(25), the field's data type has changed but the size of the table has increased from 25MB to 33MB.
I then tried to update the field using the following command: Update table1 set field1 = RTRIM(Field1) but to no avail, the data did not shrunk.

Am I missing something?

Thanks in advance..
Music Rocks www.musicreserve.blogspot.com
Success is 1% Inspiration & 99% Perspiration
God Sometimes Delays His Help to Test Our Faith and Energize Our Prayers
Our Boat May Be Tossed While He Sleeps, But He Wakes Up Before it Sinks.
Next
Reply
Map
View

Click here to load this message in the networking platform