Alas, poor! The first time I used an external connection with SQL that has been used for so long today, the effect is good. The method is as follows:
Use Outer Join
Rows are returned only when at least one row in the same two tables meets the join conditions. The inner join removes rows that do not match any row in the other table. The outer join will return all rows of at least one table or view mentioned in the FROM clause, as long as these rows meet any Where or HAVING search conditions. Searches all rows in the left table referenced by the left Outer Join and all rows in the right table referenced by the right outer join. All rows of the two tables in the complete external join will be returned.
Microsoft®SQL Server™2000 use the following SQL-92 keywords for outer joins specified in the FROM clause:
Left outer join or LEFT JOIN
Right outer join or RIGHT JOIN
Full outer join or FULL JOIN
SQL Server supports the SQL-92 Outer Join syntax and specifies the old syntax for outer join using the * = and = * operators in the Where clause. Since the SQL-92 syntax is not prone to ambiguity, while the legacy Transact-SQL Outer Join sometimes produces ambiguity, it is recommended to use the SQL-92 syntax.
Use a complete external connection
To retain the unmatched information by including unmatched rows in the join results, use the complete external join. Microsoft®SQL Server™2000 The Complete External JOIN operator full outer join is provided. no matter whether the other table has a matching value, this operator includes all rows in both tables.