SQL Server r2--Internal connection left connection right connected full connected cross Connect

Source: Internet
Author: User

 SELECT *  fromtable_aGO SELECT *  fromTable_bGO  --Internal Connection SELECTA.*B.*  fromTable_a AJOINTable_b B ona.ID=b.idSELECTA.*B.*  fromTable_a AINNER JOINTable_b B ona.ID=b.idGO  --the form of an internal connection equivalent direct multiple table from SELECTA.*B.*  fromTable_a AINNER JOINTable_b B ona.ID=b.idSELECTA.*B.*  fromTable_a A, Table_b BWHEREa.ID=b.id--left Connection SELECTA.*B.*  fromTable_a A Left JOINTable_b B ona.ID=b.idSELECTA.*B.*  fromTable_a A Left OUTER JOINTable_b B ona.ID=b.idGO  --Right Connection SELECTA.*B.*  fromTable_a A Right JOINTable_b B ona.ID=b.idSELECTA.*B.*  fromTable_a A Right OUTER JOINTable_b B ona.ID=b.id--A left connection B is equivalent to B right connection a SELECTA.*B.*  fromTable_a A Left JOINTable_b B ona.ID=b.idSELECTA.*B.*  fromTable_b B Right JOINTable_a A ona.ID=b.id--Fully connected SELECTA.*B.*  fromTable_a A Full JOINTable_b B ona.ID=b.idSELECTA.*B.*  fromTable_a A Full OUTER JOINTable_b B ona.ID=b.id--A cross join without a WHERE clause will produce a Cartesian product of the table involved.  SELECTA.*B.*  fromTable_a A Cross JOINTable_b B--If you add a WHERE clause, the behavior of the cross join is similar to the inner join behavior SELECTA.*B.*  fromTable_a A Cross JOINTable_b BWHEREa.ID=b.idSELECTA.*B.*  fromTable_a AINNER JOINTable_b B ona.ID=b.ID

SQL Server r2--Internal connection left connection right connected full connected cross Connect

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.