Dumbo Dumbo - 1 year ago 50
MySQL Question

How to Delete an entry based on Combining TWO COLUMNS

I have a table called Customer containing Id, Firstname, Lastname, Phone as their respective columns.

Now I want to delete an entry from the table Using Fullname.

DELETE FROM customer
WHERE exists (SELECT * Id,CONCAT(Firstname," ",Lastname) as wholename
from customer where wholename ="Andre Russel");

Answer Source


DELETE FROM customer
WHERE CONCAT(Firstname,' ',Lastname) = 'Andre Russel'