SQL Command To Delete Entry In Current Textfields For Java App

前端 未结 1 1563
长发绾君心
长发绾君心 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 =  AND
        LastName =  AND
        Email =  AND
        PhoneNumber = 
    

    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)
提交回复
热议问题