Dumbo Dumbo - 2 months ago 5
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

Try:

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