>Hi Jayesh. Its mark. hope you recognized me. I was looking at your answer. I have a question that how can i set defaults for each data type to avoid this NULL problem in sql server. If possible please explain steps in sql server how to do this.
>
>Thank you very much in advance
>mark
Hi Mark,
Run the following script from Query Analyzer.
-- Character DataType
CREATE DEFAULT Space_Def AS " "
EXEC sp_bindefault "Space_Def", "{TableName}.[{Column_Name}]"
-- Numeric Default
CREATE DEFAULT Num_Def AS 0
EXEC sp_bindefault "Zero_Def", "{TableName}.[{Column_Name}]"
Same way you can create and bind defaults for other data types.
HTH
Bye
Jayesh
- Jayesh