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: 65086
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: Tue Jul 25 04:20:40 CDT 2017

Total time taken to generate the page: 0.10498 seconds