Just a little snippet to delete orphaned node revisions in Drupal (6/7). Take care, if you have other important dependencies in your database.
The table names must eventually be changed according to your selected table prefix!
DELETE FROM node_revisions WHERE node_revisions.vid NOT IN (SELECT n.vid FROM node n)