Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question about field defaults
Message
From
15/04/2002 08:13:25
 
 
To
14/04/2002 16:51:57
General information
Forum:
Microsoft SQL Server
Category:
Database design
Miscellaneous
Thread ID:
00644867
Message ID:
00644961
Views:
10
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform