JDBC delete statement with multiple columns

Posted by user1643033 on Stack Overflow See other posts from Stack Overflow or by user1643033
Published on 2012-12-01T04:49:47Z Indexed on 2012/12/01 5:03 UTC
Read the original article Hit count: 96

Filed under:
|
|

It says I ended this statement wrong when if I input it into sql plus with just the addition of ; it works perfectly. What am I doing wrong?

    Statement statement = connection.createStatement();
    statement.executeUpdate("delete from aplbuk  MODEL = '"+   textField_4.getText()  + "'AND  year = '" + textField_1.getText()  + "' AND Litres = '" + textField_2.getText() 
    + "' AND ENGINE_TYPE = '" + textField_3.getText() + "'");
    statement.close();

© Stack Overflow or respective owner

Related posts about java

Related posts about sql