I\'m trying to match up data from two tables. One is an invoices table with the date when a thing goes out and when it comes back in. The other is a line item table with each it
When using JOIN, always use the ON or USING (fields, ...) part of the syntax.
In this case the field name in both tables was the same, invoice_number, so USING (invoice_number) was an appropriate syntax.
If they where different names ON invoices.ID = line_item.invoice_number syntax could be used.
Multiple conditions could be used so the criteria can be used in some ways like the the WHERE criteria of SQL.