Find unmatched records
mysql, sql
Solution
Try a `LEFT OUTER JOIN`:
SELECT * FROM forms
LEFT OUTER JOIN records
ON forms.form_id = records.form_id
WHERE records.form_id IS null
Problem
This is a mysql question. I have two tables one called forms and the other records. The records are a record for each form. I can have multiple records associate with a form id. However not all forms have a record associated with. I want to find all forms that do not have a record. The best I could do is this ``` SELECT * FROM forms JOIN records WHERE forms.form_id != records.form_id ``` However I end up with a million plus records and I know that is not correct.