Re: Default Value



On 29 Mar, 17:15, Helma <helma.vi...@xxxxxxxxxxx> wrote:
On 29 mrt, 15:32, "web.Hunter" <alberto.cerio...@xxxxxxxxx> wrote:

Hi, I've a problem with default value of integer data type: my
software work fine with oracle version 8, but fail with 11g version.
The problem is on sql insert command because are often omitted some
columns for use the default value. If the column omitted has a integer
data type, on oracle 8 the command is succesful executed; viceversa
the command faild on 11g oracle version: the response message return
an unexpected null value on a not-null column. I repeat: Only on
integer data type column.

I suppose that there is a configuration value that is possible to
modified but I don't know what and here.

Thanks
Best Regards

i'm not sure if i understand your situation correctly. You have a
table in oracle 8 that has a default value on one of the columns, and
the same table without the default value in oracle 11? Or do both
tables have a default value on that column?

select table_name, column_name , data_default from user_tab_columns
where table_name = 'YOURTABLE'  ;

should return any default value's on columns.  To put a default value
on a column, you have to use the

alter table YOURTABLE modify (....

and the rest you should know or find in the docs ;)

H.

Hi Helma,
thanks for the interest.
my problem is about the different behavior between 8 and 11g oracle
version.
The tables are the same and also the code, but if
I send to db a command without some column the result are differents
p.e.
the tableA have col_3 defined NUMBER NOT NULL default 5
the command is "insert into tableA (col_1,col_2, col_4) values
('a','b',5)"
(I don't have defined the value of column 3)

result
with oracle 8 the commend insert a record
with 11g version I have a error like "unexpected null value on
a not-null column."

This problem is on integer data type column only.

I suppose that there is a configuration value that is possible to
modified but I don't know which and where.

bye
.



Relevant Pages

  • SUMMARY: sudo version 1.6.7p5 : using -H -u options on Solaris 8
    ... Many thanks to those that responded, as expected all responses were helpful. ... This will allow you to do the thing that the user oracle requires while also ... designated in the sudoers file who requires to use the command, ... there is a CLASSPATH variable set which, as the oracle user I can see by ...
    (SunManagers)
  • Re: Basic question | run multiple queries without reconnecting
    ... :>From an oracle client like oracle sqldeveloper, I can run the DCL - ... : system as role: sysdba - but then I cant even connect to the db.. ... as default - I get the same error when I run this command: ...
    (comp.databases.oracle.server)
  • Default Value
    ... I've a problem with default value of integer data type: ... software work fine with oracle version 8, ... The problem is on sql insert command because are often omitted some ...
    (comp.databases.oracle.server)
  • Re: Default Value
    ... software work fine with oracle version 8, ... The problem is on sql insert command because are often omitted some ... data type, on oracle 8 the command is succesful executed; ...
    (comp.databases.oracle.server)
  • Re: How many names and addresses can you have for ID card
    ... Think command line only (except when you're installing, ... which is unsettling to we Linux users. ... This is NOTHING to do with Oracle though. ...
    (uk.legal)