Delete query not working in mysql

You don’t need to use the asterisk in a delete. Just do DELETE FROM user_enrole to delete all records.

If you want to delete specific records filtered by one or more conditions, you will specify those conditions in the WHERE clause, like so:

DELETE FROM user_enrole
WHERE somecolumn > 1
AND anothercolumn = 'Username'

Leave a Comment