select * from table where aa=(select aa from table where bb="")

解决方案 »

  1.   

    不会吧,我没有关闭代码呀,如:
     //选择医院
    public ResultSet getinstituteinfo()
    {
            rs=null;
            try
            {
                 rs=stmt.executeQuery("select * from T_Institute  where(Valid=1)");
                 return rs;
             }
            catch(SQLException e)
            {
                 return rs;
              }
     }
    引用就是
    while(rs.next())
    {
      .....
    }
    好像没有关闭太早的理由啊?!
      

  2.   

    你把RS从try里面放出来试试看~