BUG: Example of Sp_addtype Is Unclear in the DocumentationID: Q157980
|
Example B in the "Transact-SQL Reference" section on sp_addtype does not always add a user-defined datatype that defaults to allowing nulls.
Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.0 documentation. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
In the section on the nulltype parameter for sp_addtype, the "Transact-SQL
Reference" correctly states that if a null value is specified for this
parameter, the default nullability setting of the data type will be based
on the current ansinull setting for the connection. You can determine what
the current setting is by using the system function getansinull(); you can
control the setting with the SET and sp_dboption commands.
The following command in example B is supposed to always enable the default
nullability of a user-defined datatype:
sp_addtype birthday, datetime, NULL
sp_addtype birthday, datetime, 'NULL'
Additional query words: wrong incorrect erroneously erroneous
Keywords : kbusage SSrvDoc_Err SSrvStProc SSrvTran_SQL kbbug6.00
Version : 6.0
Platform : WINDOWS
Issue type :
Last Reviewed: April 2, 1999