sql >> Database teknologi >  >> Database Tools >> phpMyAdmin

MySQL Query virker i PhpMyAdmin, men ikke i JAVA Eclipse

Du kan bruge addBatch

String s1 = "SET @count = 0";
String s2 = ...

try {
// query to reset menu_id manly after delete row
     connection = database.getConnection();
     Statement statement = connection.createStatement();
     statement.addBatch(s1);
     statement.addBatch(s2);    
     statement.addBatch(s2);   
     s.executeBatch();
     connection.commit();
} catch (SQLException e) {
    connection.rollback();
    throw e;
} finally {
    close(statement);
    close(connection);
}



  1. MYSQL 8.0 - ikke-understøttet redolog-format

  2. Microsoft SQL Server copy paste resultater til excel virker ikke

  3. import/eksport meget stor mysql-database i phpmyadmin

  4. Operation ikke tilladt, når innodb_forced_recovery> 0 [SqlYog]