SQL Command To Delete Entry In Current Textfields For Java App

前端 未结 1 1538
长发绾君心
长发绾君心 2021-01-27 11:08

I have a Java program where I connect to a database running Tomcat. The app includes fields for First Name, last name, email, phone. I created a button when clicked allows you t

相关标签:
1条回答
  • 2021-01-27 11:59

    If I understand you correctly:

    DELETE FROM
        Addresses
    WHERE
        FirstName = <Your value here> AND
        LastName = <Your value here> AND
        Email = <Your value here> AND
        PhoneNumber = <Your value here>
    

    This will delete from Addresses where all conditions are true.

    A more elegant solution would probably be one where you delete a row with a primary key.

    0 讨论(0)
提交回复
热议问题