Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Can't write Null into nullable field?
The correct syntax is:
update content set prev_content_id = NULL where content_id = 3070
You tried quoting the word Null, which makes your constant a string with the value of Null.
Rich Gilmour wrote:
>
> Hello everyone. Using SQL Worksheet, I typed the following :
>
> SQLWKS> describe content
>
> Column Name Null? Type
>
> ......blah blah foo biz baz
>
> PREV_CONTENT_ID NUMBER(9)
> NEXT_CONTENT_ID NUMBER(9)
>
> Fine. I then attempt the following :
>
> update content set prev_content_id = 'Null' where content_id = 3070
>
> ...and get the following error message : ORA-01722: invalid number
>
> From the looks of the description of this table, prev_content_id is
> nullable, yet I get an error trying to save Null into this field. Could
> someone please shed some light on this one?
>
> Thanks very much in advance,
>
> Rich
--
David Munsey-Kano
Dartmouth College
(603) 646-1320
Murphy was a liar, not a lawyer! Received on Thu Jan 06 2000 - 14:08:05 CST