Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Varchar(max) vs Varchar(400)
Message
De
28/08/2013 10:05:08
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 6.5 and older
Application:
Web
Divers
Thread ID:
01581593
Message ID:
01581597
Vues:
66
J'aime (1)
SQL Server will only store what it needs to, but I question the design. Why store them all in one row instead of separate rows?

>Hi,
>
>I need to add a column to a table that will store a string of email addresses. I am trying to decide between making this field type Varchar(SomeNumber) or Varchar(max). I expect that there will be need to store, at most, 10 email addresses in this field. So I figure that on average each email will take 40 characters and 400 will give me enough length to store 10 emails. Another approach is to make this field Varchar(max) which, I understand, will give me pretty much unlimited length. But I am concerned that Varchar(max) adds some load to the SQL Server database or SQL Server itself and leaning towards just Varchar(number). Is my concern of Varchar(max) valid? Or what would you do?
>
>TIA
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform