Ciao a tutti, ho scritto questa query di aggiornamento della tbella
codice:
c.prepareStatement("UPDATE stazione_meteo SET velocita_vento=?, direzione_vento=?,raffica_vento=?,TIME=? WHERE TIME= SELECT MAX(TIME) FROM stazione_meteo ");
ma continua a darmi questo errore :
codice:
jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT MAX(TIME) FROM stazione_meteo' at line 1
Mi potete aiutare???A me la query sembra giusta.
Grazie a chi risponderà