Home » SQL & PL/SQL » SQL & PL/SQL » default value and not null constraint (Oracle 8, 9,10)
default value and not null constraint [message #358355] Mon, 10 November 2008 19:39 Go to next message
Messages: 1
Registered: November 2008
Location: Germany
Junior Member
Does default value of a table column automatically implies not null constraint of this column?

I know an answer. An opinion of my chef (oracle certified DBA) concerning this simple question is exactly the opposite one.
Therefore I need more than one answer. Thank you.
Re: default value and not null constraint [message #358357 is a reply to message #358355] Mon, 10 November 2008 20:49 Go to previous messageGo to next message
Messages: 540
Registered: February 2008
Senior Member

may be my english is very poor to understand your querry. anyway i guess something and replying. unless you create constraint as not null, columns will accept null.
Re: default value and not null constraint [message #358381 is a reply to message #358355] Tue, 11 November 2008 01:24 Go to previous message
Michel Cadot
Messages: 63937
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Maybe you could try.
SQL> create table t (col integer default 0);

Table created.

SQL> insert into t values (null);

1 row created.

SQL> select col from t;

1 row selected.

Previous Topic: Query output - Help
Next Topic: REGEXP_LIKE function
Goto Forum:

Current Time: Thu Oct 27 21:26:52 CDT 2016

Total time taken to generate the page: 0.13003 seconds