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

Home -> Community -> Usenet -> c.d.o.server -> Error: 'ORA-01400: cannot insert NULL into ('

Error: 'ORA-01400: cannot insert NULL into ('

From: <srhari_at_gmail.com>
Date: 20 Jan 2006 16:26:20 -0800
Message-ID: <1137803180.249052.318270@g43g2000cwa.googlegroups.com>


I'm trying to insert a record into a table, but getting the error - 'ORA-01400: cannot insert NULL into (....'. The table structure is:

recnum number primary key,
ap# varchar2,
program varchar2

My insert statement looks like this: INSERT INTO history ( ap#, program ) valus ) ('aaa', 'aaa').

I know that i have to supply value for primary key as well, but I want to have functionality something like IDENITITY in SQL Server where I never pass value to primary key and let the database to supply it's own. How to achieve this in Oracle?. I don't want to use SEQUENCE as well. I'm framing this query dynamically from c# and it's not a stored procedure. Is there any way to achieve it?

Thanks,
Hari. Received on Fri Jan 20 2006 - 18:26:20 CST

Original text of this message

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