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

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -