Dumbo Dumbo - 1 year ago 65
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'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download