Delete all database values

Well the logic is right, as long as there is another item keep deleting…Not sure about the syntax though.
What error do you get on the developer console?