7. ORA-00911 invalid character
An ORA-00911 error message is an error that occurs when an SQL statement is misspelled.
if you faces this error, check this 4 cases.
- missed or wrong put the ‘(single quotation)
- missed or wrong put the ;(semicolon)
- checked ?(question mark)
- checked alias
Ex1)
StringBuffer sql = new StringBuffer();
sql.append(" insert into dept (dept_id,name) values(?,?) ; ");
-> delete ; where end of “
StringBuffer sql = new StringBuffer();
sql.append(" insert into dept (dept_id,name) values(?,?) ");
Written on September 13, 2017