Access and change link data, and use MSSQL Outer Join

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.