Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Default values

Re: Default values

From: rkajda <rkajda_at_ComArch.pl>
Date: Mon, 18 Jan 1999 09:45:30 GMT
Message-ID: <36A30254.B7032D94@ComArch.pl>


Hi,
1. When you define default value as '' that the value is defined as NULL so as default value you have to use some other character or string. 2. Because you have defined column as not null and default value assigned as '' (NULL) you've got error.

s.selin_at_viskan.se wrote:

> Hi all !
>
> I'm a newbie at Oracle but have experience in CA-Ingres and MS-SQLServer.
> I've created a database in Oracle, not allowing NULL values in any column and
> with default values.
>
> Now I got two problems.
>
> 1. I like varchar columns to have a default value separated from NULL but not
> one blank. In both CA-Ingres and MS-SQLServer am I able to define '' as the
> default value. How do I do this in Oracle 8 ?
>
> 2. I'm not able to do a insert, without specifing values to all columns.
> I got error message "null values not allowed" doing this, despite I have
> declared default values for the columns not involved in the insert.
> I like the default values to get inserted when the column is not mentioned
> in the insert. How do I do this ??
> (the second problem might be just depending on problem 1)
>
> TIA
> Sten Selin, s.selin_at_viska.se
> Viskan Info System, Sweden
> www.viskan.se
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own


Received on Mon Jan 18 1999 - 03:45:30 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US