Description:-
perform a delete SQL query after checking whether the record is present or not.
anyone can use this method to perform other query operations.

Example:-

user_iduser_nameuser_email
1Arunarun123@gmail.com
2Sujansujan123@gmail.com
3Rohitrohit123@gmail.com

SQL:-

IF EXISTS (
    SELECT *
    FROM user
    WHERE user_email = 'rohit123@gmail.com'
)
BEGIN

    DELETE
    FROM user
    WHERE user_email = 'rohit123@gmail.com'

END

Result:-

user_iduser_nameuser_email
1Arunarun123@gmail.com
2Sujansujan123@gmail.com