pm = con.prepareStatement("SELECT EMP_NAME FROM EMP where EMP_ID IN (?) "); pm.setString(1, "2,5,7"); //created many employees and id with 2, 5 and 7