BUG: Error When Inserting NULL into Timestamp with ANSI_NULLS (170318)
The information in this article applies to:
This article was previously published under Q170318
BUG #: 15818 (NT: 6.50)
SYMPTOMS
When attempting to insert the value 'NULL' into a timestamp column with
ANSI_NULLS enabled, error 273 is returned:
The user can't INSERT a non-null value into a TIMESTAMP column.
Use INSERT with a column list or with a default of NULL for the
TIMESTAMP column.
WORKAROUND
To work around this problem, do either of the following:
- Disable ANSI_NULLS before inserting NULL into a timestamp column, as in
the following example:
create table tblNull ( iId int, timestamp )
go
set ansi_nulls off
go
insert tblNull values (1, NULL)
go
-or-
- Use a column list on the INSERT statement and omit the timestamp, as in
the following example:
insert tblNull (iId) values (1)
go
STATUS
Microsoft has confirmed this to be a problem in Microsoft SQL Server
version 6.5. We are researching this problem and will post new information
here in the Microsoft Knowledge Base as it becomes available.
Modification Type: | Major | Last Reviewed: | 10/3/2003 |
---|
Keywords: | kbBug kbinterop kbusage KB170318 |
---|
|