java - SQL Exception: ORA-00936: missing expression -


i running following query:

my query = insert tbl_name (id,name, address,...)" +" values (?,?,?)

then using query runner class insert.

myqueryrunnerobj.insert("my query", result set handler obj, generated id, 'my name', 'my address',...);

after getting following exception: exception in thread "main" java.sql.sqlexception: ora-00936: missing expression , invalid number of arguments expecting 11 given 10

what reason exception?

correct syntax is:

insert dept (deptno, dname) values (dept_seq.nextval, 1); 

or

insert dept (deptno, dname)  select dept_seq.nextval, 2    dual; 

Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -