PLS-00103: столкнулся с символом ", " при ожидании
create or replace function sum (n1 in number,n2 in number) return number is temp number(8); begin temp :=n1+n2; return temp; end; /
Ошибка :
java.sql.SQLException: ORA-06550: строка 1, столбец 19:
PLS-00103: столкнулся с символом "," при ожидании одного из следующих действий:
. ( ) * @ % & - + / at mod остаток rem <экспонента="" (**)="">
|| показатель мультимножество
Что я уже пробовал:
import java.sql.*; class CallableStatementFunction { public static void main(String args[])throws Exception { try { Class.forName("oracle.jdbc.driver.OracleDriver"); Connection con=DriverManager.getConnection("....."); CallableStatement cs=con.prepareCall("{?= call sum(?,?)}"); cs.setInt(2,10); cs.setInt(3,20); cs.registerOutParameter(1,Types.INTEGER); cs.execute(); System.out.println("10+20 =" + cs.getInt(1)); cs.close(); con.close(); } catch(Exception e) { System.out.println(e); } } }