Question: how to copy data from one table to another in mysql using java?
Answer: 2 Answers. String sql ="INSERT INTO table_a (some_num, text, popularity) " + "SELECT numero, text, count(text) table_b GROUP BY text"; PreparedStatement pstm = conn. prepareStatement(sql); pstm. executeUpdate();