How do you insert a null value into a date field? I've tried to use 'null' and ' ' but there's an error. How do you do it?
Thanks in advance.
Printable View
How do you insert a null value into a date field? I've tried to use 'null' and ' ' but there's an error. How do you do it?
Thanks in advance.
Just use null, nothing more, nothing less:Code:scott@oracle> create table d (dd date);
Table created.
scott@oracle> insert into d values(null);
1 row created.
Thanks for the answer
:D
In case of nulls it is a good practice to use
explicit conversion:
insert into d values(to_date(null));