Follow the left join followed by where it becomes inline. Baidu after seeing this solution.
The records are as follows:
Select SRE. * , Co.description from Left outer Join on Sre.locationincdr=co.optionvalue where co.optionname= ' LOCATIONINCDR ';
Select SRE. * , Co.description from Left outer Join Custom_options Co on (Sre.locationincdr= and Co.optionname='locationincdr ');
The first SQL is a left outer join and then the where filter. Careful analysis of this SQL will find that the final result is not expected, the Custom_options table in the non-qualifying record is null, due to the filter in where, resulting in the query out of the portion of the null record is not queried. The left outer connection is no different from the inner connection.
The second SQL statement will meet the requirements. When you make a connection, you filter out some of the records on the right, so that even the left table record that doesn't match the right table can be queried.
MSSQLServer database-left join followed by where to become an inline workaround