使用Mybatis时报错Cause: java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符

首先保证sql语句在oracle中的编写是正确的,然后在配置文件中插入时就报这样的错误。有可能是因为sql语句后面多了“;”分号,在标签中写分号是错的。如果我写成了

insert into employees(employee_id,last_name,email,gender)
values(employees_seq.nextval,'xiao','[email protected]','1');

将其改成下面这样就可以了

insert into employees(employee_id,last_name,email,gender)
values(employees_seq.nextval,'xiao','[email protected]','1')

猜你喜欢

转载自www.cnblogs.com/liaoxiaolao/p/9975524.html
今日推荐