Skip to content
Advertisement

Insert Procedure showing compilation error (Oracle)

I am using Oracle 12c and a certain requirement needs me to prepare an insert procedure. I am not very familiar with procedures so would you please tell me what’s wrong?

Table statement:

Procedure:

I am getting ora-00900 invalid sql statement and ora-24344 success with compilation error

Advertisement

Answer

I’d suggest you to set parameters’ names differently than column names; that causes problems. For example, use par_ prefix.

Though, even if you don’t do that in this case (as you’re only inserting values), nothing would happen.

Procedure looks OK and executes correctly with or without prefix.

Testing:


As of compilation errors: if you’re using SQL*Plus, type show err and Oracle will let you know what’s wrong. For example, I removed comma:

Or, query USER_ERRORS:

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