stored procedure
CallableStatement cs;
cs = conn2.prepareCall("{call pack99.proc99(?)}");
cs.setInt(1, 1);
cs.execute();
System.out.println(cs.getInt(1));
CREATE OR REPLACE procedure test_proc is
tot number;
begin
select amt into tot from test1 where id=2;
dbms_output.put_line(tot);
exception
when others then
dbms_output.put_line('To many rows');
end test_proc;
i am getting an exception here why? "Invalid column index"

