Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question about field defaults
Message
De
15/04/2002 08:13:25
 
 
À
14/04/2002 16:51:57
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
00644867
Message ID:
00644961
Vues:
11
>1) If I set the default of a char(6) field as '', will the stored value be a string of 6 spaces or no spaces?

You'll get six spaces. A fixed length column backfills with spaces. Use a varchar or nvarchar column if you don't want this behavior.

>2) I upsize free table numeric fields as SS decimal fields of the appropriate precision and scale. Must I define such fields' default as 00000.00 (appropriate number of zeroes) or will 0 sufice?

You should be able to use a default of 0 or 0.00.

>3) What date do you recommend to take the place of empty date fields?

Personally, I'd allow NULLs in the column and use a NULL value when there is no date.

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform