java 往oracle中插入SQL语句出现:“索引中丢失 IN 或 OUT 参数:: 1”

有没有人在啊,想请教下,java 往oracle中插入SQL语句出现:“索引中丢失 IN 或 OUT 参数:: 1”?

java 往oracle中插入SQL语句出现:“索引中丢失 IN 或 OUT 参数:: 1”
if("0".equals(emp.getPeriodType())){
sql="insert into emp_info(emp_seq,emp_id,emp_name,emp_sex,emp_birth,emp_card," +
" start_date,job_date,emp_forms,emp_origin,polit_status,nation,native_place," +
" emp_tel,email,stature,blood_type,marriage_status,birth_place,domicile_place," +
" hight_education,hight_degree,school_name,major,grad_date,dep_id,post_id,type)" +
" Values (emp_seq.nextval,?,'aa','男',to_date('1985-4-8','yyyy-mm-dd')," +
"'211334678965437662',to_date('2010-01-07','yyyy-mm-dd'),to_date('2010-01-07','yyyy-mm-dd')," +
"'q','q','a','a','a','a','a','a','a','a','a','a','a','a','a','a'," +
"to_date('2010-01-07','yyyy-mm-dd'),'A0001','P0001','0')";
// sql="insert into emp_info(emp_seq,emp_id,emp_name,emp_sex,emp_birth," +
// "emp_card,start_date,job_date,emp_forms,emp_origin," +
// "polit_status,nation,native_place,emp_tel,email," +
// "stature,blood_type,marriage_status,birth_place,domicile_place,hight_education," +
// "hight_degree,school_name,major,grad_date,dep_id,post_id,type)" +
// " values(emp_seq.nextval,?,?,?,to_date('?','yyyy-mm-dd'),?,t
最新回答
路遥归梦

2024-10-17 08:29:52

貌似不是完整的代码吧
你在插入seq时
使用的是emp_seq.nextval
是不是这里的问题
我现在用的方法是,以你的为例
select emp_seq.nextval BizSeq from dual
将bizseq赋值到上面
不知道你的那种写法是否正确
你可以试一试这种的
看看还会不会报错