Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8292473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:29:36+00:00 2026-06-08T13:29:36+00:00

We recently migrated from Oracle version 9.2 to 11g. But some bugs appeared with

  • 0

We recently migrated from Oracle version 9.2 to 11g.
But some bugs appeared with the application using the database. We get the following exception:

ORA-01400: cannot insert null into...

I looked for information about the error and especially about some new features in version 11g that might be the cause.

And here I’m. I know that the old way of defining table columns with default values could not work, but I don’t why, and more important how to resolve the issue.

Here’s the definition of the table I can see using SQL Developer:

COLUMN_NAME         DATA_TYPE       NULLABLE      DATA_DEFAULT   COLUMN_ID
--------------------------------------------------------------------------
...
REP_DOC_RECEIVED    CHAR(1 BYTE)    No            'n'            12 
...

When I try to insert a row with a null value for that column, the exception is thrown.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T13:29:38+00:00Added an answer on June 8, 2026 at 1:29 pm

    A default value only applies, when no value is provided in the insert statement. So I guess your insert makes some insert into ... values ( ... , NULL, ...).

    See for example http://sqlfiddle.com/#!4/cd58c/7 to show the difference:

    -- ok
    insert into a (n,REP_DOC_RECEIVED) values (1,'A');
    
    -- ok, default is applied    
    insert into a (n) values (1);
    
    -- not ok, NOT NULL constraint violated    
    insert into a (n,REP_DOC_RECEIVED) values (1,'');
    

    You have to do either NVL(...,'n') in your insert statement or to leave out the column. And no, this didn’t change in 11g.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently migrated a database from mysql to pgsql 9. But now when I
Recently we migrated from VSS to SVN. But I don't want VSS removed totally,
I recently migrated my JSF app(using primefaces) from glassfish 3.1 to tomcat7 server. Previously
We had an application using axis2 1.0. We recently migrated to axis2 1.4. After
I recently migrated from a PostgreSQL database to a SQL Server database. To switch
I recently migrated a database from sql server 2005 to 2008 on windows server
I recently migrated an older application we have at work from Java 1.5 to
I recently migrated an application from IIS6 to IIS7. I've noticed two distinct differences
I've recently migrated my CI server from an old version of CruiseControl to Hudson.
We have recently migrated a large, high demand web application to Tomcat 5.5 from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.