I have a simple database named customer with a single table data.I want to check if a customer name exits in the database,if then i want to delete it.I’m using MYSQL Connector for this.
EDIT:
I want to make sure the value is present before deleting to display
a simple user message.
Why not just deleting it?
If it exists, it will be deleted. Otherwise no rows will be affected.
EDIT:
If you need a more complicated process, then I recommend (in order):
ON DELETE FOR EACH ROWtrigger, that will auto update flags upon deletion;It would be easier to answer if you could provide more details on your design.