title: How to Store Array value in table column in mySql using java
body: <p>hello i am trying to retrieve data in two result set. then i have store in both resultset to String Array, after this process i have to store my String array to another table how to so this kindly tell me..</p>
  
  <pre><code>try {
      Class.forName("com.mysql.jdbc.Driver");
      Connection con = (Connection) DriverManager.
           getConnection("jdbc:mysql://localhost:3306/lportal", "root", "ubuntu123");
      PreparedStatement stmt = (PreparedStatement) con.
           prepareStatement("SELECT * FROM  Testi_Testimonial where subject = ?");
      stmt.setString(1, search);
      stmt.execute();
      rs = (ResultSet) stmt.getResultSet();
      while (rs.next()) {
        anArray[i] = rs.getString("subject");
        System.out.println(anArray[i]);
        i++;
        count++;
      }
      PreparedStatement stmt1 = (PreparedStatement) con.
           prepareStatement("SELECT * FROM Testi_Testimonial where subject != ?");
      stmt1.setString(1, search);
      stmt1.execute();
      rs1 = (ResultSet) stmt1.getResultSet();
      while (rs1.next()) {
        anArray[i] = rs1.getString("subject");
        System.out.println(anArray[i]);
        i++;
        count++;
      }
  } catch (Exception e) {
    e.printStackTrace();
    System.out.println("problem in connection");
  }
  </code></pre>
  
  <p>Please tell me how should I store my array to <code>Temp</code> table? my "Temp" table has column <code>subject</code> I want to store <code>myArray</code> to <code>subject</code> column... kindly tell me how to  do this.</p>