statement2=Myconn.prepareStatement("SET @rank:=0; update entretien "+
" set numero_entretien=@rank:=@rank+1 where vehicule_id=?;");
statement2.setInt(1,1);
statement2.executeUpdate();
This query works on mysql workbench , but it doesn't work in java
I have latest MySQL and JDBC version ,I think that the problem is maybe in the ";" that follow @rank:=0 ?