Q:

Column equivalence, including on NULL value

Is there a better way to do the following to get equivalence?
SELECT * FROM table
WHERE
  ((accepted_imdb_url = imdb_url) OR (imdb_url IS NULL and accepted_imdb_url IS NULL))

A:

The standard SQL answer would be to use a IS DISTINCT FROM b / a IS NOT DISTINCT FROM b. However, MySQL doesn't support that. MySQL does support its own invention that achieves the same effect: the <=> operator.
SELECT *
FROM table
WHERE accepted_imdb_url <=> imdb_url

