Skip to content
Advertisement

Oracle not auto-generating primary key on insert

New to Oracle here. I have a table created with the following SQL:

I’m now trying to insert a record into this table with:

And getting the following error:

What’s going on here? Shouldn’t Oracle be auto-generating my primary key (id field) value? If not, how can I tell (exact SQL) what needs to be inserted for this value?

Advertisement

Answer

I was able to use ids.nextval and my insert works great:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement