查询语句:select * from table_name where id='1'; 在jdbc中我们可以这样查询String sql = "select * from table_name where id=?";
PreparedStatement ps = conn.preparedStatement(sql);
ps.setString(1, "1");
ps.executeQuery();在存储过程中可以这么用
create or replace procedure(vId in char) as
   .... 
    begin 
    ....
      select name into ..from table_name where id=vId;
    ....
    end;通过 ‘?’占位符传参数。
但是这样id的值只能有一个。如果我想批量查询,如:select * from table_name where id in ('1','2','3'.....);就是in里的数据个数不固定。在jdbc中该如何使用?
在存储过程中又怎么传递参数呢?(不要拼接字符串)求指点.