Permission denied while trying to delete even when delete is granted
After a bit of hunting I realized that maybe I am getting this error because I am adding a condition to delete. Which means the database is probably selecting those records. And I hadn't granted select on the table to the user.
Grant select: grant select on table to username
And it worked.