oracle中如何用存儲過程實現數字的模糊查詢?
create or replace procedure get_data_by_sno(no in varchar2,out_cursor out sys_refcursor) as
begin open out_cursor for select student.sno,sname,thname,cname,teacher,grade from student,theme,grade where to_char(student.sno) like no and student.sno=grade.sno and theme.thno=grade.thno;
end
state.setString(1, "%039");
state.registerOutParameter(2, oracleTypes.CURSOR);
改成這樣就行了。