469,625 Members | 1,089 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

Oracle column default value

was
Hi All,

I 'm using Oracle 8i and i have a table table1 with two columns:

COL1 not null
COL2 DEFAULT 'N'

if i make an insert :
insert into table1(COL1,COL2) values (1,null)

The column COL2 is null and I would like to have N (the default value)

when i make an insert like this:
insert into table1(COL1) values (1)
it's work well. The value of the COL2 is 'N'.

i don't want to use the trigger to do this.

Thanks for your help.
Jul 19 '05 #1
1 18904
Hello, was,

near 06:42 14-Jul from wa***@wanadoo.fr:
Hi All,

I 'm using Oracle 8i and i have a table table1 with two columns:

COL1 not null
COL2 DEFAULT 'N'

if i make an insert :
insert into table1(COL1,COL2) values (1,null)
insert into table1(COL1,COL2) values (1,nvl(null,'N'))
The column COL2 is null and I would like to have N (the default value)

when i make an insert like this:
insert into table1(COL1) values (1)
it's work well. The value of the COL2 is 'N'.

i don't want to use the trigger to do this.

Thanks for your help.


--
wbr,
Wit.
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by susmita_ganguly | last post: by
1 post views Thread by Phil Hindmoor | last post: by
reply views Thread by JWM | last post: by
reply views Thread by was | last post: by
1 post views Thread by Andrew Arace | last post: by
6 posts views Thread by hegyvari | last post: by
56 posts views Thread by Ashish Patankar | last post: by
9 posts views Thread by matt | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.