[Solved] SQL Join query to return matching and non-matching record


Your problem is coming from including columns in SELECT statement from table_2 that do not have values for rows that exists in table_1. You need to change SELECT Table_2.ScriptNumber to SELECT Table_1.ScriptNumber

As future reference make sure you always select all relevant columns from LEFT tables and only columns you need from RIGHT table. Otherwise you end up with less NULL rows instead of having data that is present in LEFT table.

solved SQL Join query to return matching and non-matching record