Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Error: 'ORA-01400: cannot insert NULL into ('
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
![]() |
![]() |