Solved

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

Posted on 2004-08-24
4
896 Views
Last Modified: 2008-01-09
will Oracle allow one to store a date of space/zero/null?
0
Comment
Question by:bolicat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Suggested Courses

624 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