Doing this directly in the database can be messy given the way Drupal abstracts its managed files. It is usually better to try and find a solution that works with the Drupal file API directly so you're not forgetting some entry somewhere and leaving extra cruft in your database. You could roll your own solution using the file API and file_delete() but I would suggest that you're better off doing this using an interface like IMCE and combining that with a solution like this module:
which would resolve this problem for you going forwards:
The problem with drupal is if you have a file called "mydoc.doc" upload it to a node, then make changes to "mydoc.doc" and upload the newer version, the newer version will be renamed to "mydoc_0.doc" because at the time of upload the old file was blocking the desired path name.
This module solves that problem by swapping the names of the older and newer file so that the newly uploaded file will retain its original name.