SQL FAQ: How can I select every row from a database table where a column value is not unique?
I’m working on an problem today where a Drupal article can have many revisions, and the way Drupal works is that a table named
node_revisions has a
nid field for “node id,” and a
vid field for “revision id.” If you have five revisions of an article (i.e., a blog post), there will be five records in this table, and each record will have the same
nid value and a unique
vid. If an article has no revisions, this table will have one entry with a unique
nid and unique