Solved

will Oracle allow one to store a date of space/zero/null?

Posted on 2004-08-24
4
884 Views
Last Modified: 2008-01-09
will Oracle allow one to store a date of space/zero/null?
0
Comment
Question by:bolicat
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
pratikroy earned 125 total points
ID: 11880889
It will allow to store NULL in the date.
0
 
LVL 7

Expert Comment

by:bvanderveen
ID: 11880947
AS long as you don't have a NOT NULL constraint, you can update a column to null or leave it null when created.

Can't store zero or space, though.
0
 
LVL 9

Expert Comment

by:pratikroy
ID: 11880964
SQL> create table tab_dates (dt1 date);

Table created.

SQL> insert into tab_dates values to_date('00-00-00','DD-MM-YY');
insert into tab_dates values to_date('00-00-00','DD-MM-YY')
                             *
ERROR at line 1:
ORA-03001: unimplemented feature


SQL> insert into tab_dates values to_date('  -  -  ','DD-MM-YY');
insert into tab_dates values to_date('  -  -  ','DD-MM-YY')
                             *
ERROR at line 1:
ORA-03001: unimplemented feature


SQL> insert into tab_dates values (NULL);

1 row created.

SQL> insert into tab_dates values (sysdate);

1 row created.

SQL> select * from tab_dates;

DT1
---------

24-AUG-04

SQL> select * from tab_dates where dt1 is null;

DT1
---------


0
 
LVL 15

Expert Comment

by:andrewst
ID: 11880967
0 and space are meaningless in the context of a DATE column.  Sometimes people use a date like TO_DATE('01-JAN-0001','DD-MON-YYYY') as a kind of "zero" date.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
oracle query help 29 77
Oracle Subquery bad Join 11 59
Converting a row into a column 2 44
Create table from select - oracle 6 22
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now