Estou tentando fazer a exclusão no Banco, entretanto estou recebendo essa Exception:
Exception:
> com.mysql.jdbc.exceptions.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 'DELET FROM billets WHERE id=1' at line 1
Código:
public void delet(Billet object) { String sql = "DELET FROM billets WHERE id=?"; try (Connection conn = new ConnectionFactory().getConnection()) { try (PreparedStatement stmt = conn.prepareStatement(sql)) { stmt.setInt(1, object.getId()); stmt.executeUpdate(); } } catch (SQLException e) { // TODO: Implementar Exception System.out.println("Não foi possível Excluir"); e.printStackTrace(); } }