Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing Char to Varchar Datatype
Message
De
11/08/2006 22:26:37
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Changing Char to Varchar Datatype
Divers
Thread ID:
01145012
Message ID:
01145012
Vues:
91
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform