Pessoal alguem pode me ajudar no update, esta retornando erro, estou utilizando mysql, o erro que apare é esse: 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 '(endereco = 'brasil',funcao = 'test',login = 'arqui',senha = '1234',cep = '17986' at line 1
o Código é essebtnalterar.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent evt) {
try {
Class.forName("com.mysql.jdbc.Driver");
Connection cn;
cn = DriverManager.getConnection( "jdbc:mysql://localhost:3306/locadora", "root", "123" );
Statement st = cn.createStatement();
st.executeUpdate("UPDATE funcionario SET" +
"(endereco = '"+txtrua.getText()+"',funcao = '"+txtfuncao.getText()+"',login = '"+txtlogin.getText()+"',senha = '"+txtsenha.getText()+"',cep = '"+cep.getText()+"',cidade = '"+txtcidade.getText()+"',bairro = '"+txtbairro.getText()+"',tel = '"+cel.getText()+"')");
st.close();
cn.close();
}catch (ClassNotFoundException e){
JOptionPane.showMessageDialog(null, "Falha na conexão com o banco de dados.\n" + e.getMessage());
e.printStackTrace();
}catch (SQLException e){
e.printStackTrace();
}
}
});