Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Char(100) field VS Text
Message
De
19/04/2012 11:49:40
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01542085
Message ID:
01542134
Vues:
22
>Yes, for the new field definitely go with the varchar to save space. BTW, for smaller size fields the gain is not that obvious. It is shown for big char fields, say, 15 char and up.

That would be at least that. Because, this is to support the addition of caption on images. So, we will read that from XML. I assume between 25 and 50.

>Yes, that's correct as I just verifed it with this script:
>
>
>use tempdb 
>
>create table Test (ch char(10))
>insert into Test values ('d'),('b'),('c')
>
>alter table test alter column ch varchar(10)
>
>select CH, REPLACE(ch,space(1),'-') as Verified from Test
>
>I think I need to read more in BOL on this topic as perhaps there is an option to immediately remove extra space.

Ok, I am not familar with that REPLACE syntax, but I assume it blanks out the field.

Yes, if there would be something built in to achieve the same, it would be great.

Thanks for providing the example on this topic.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform