Database query • Connect mind map & Essentials & Late (with examples)

Source: Internet
Author: User

Mind Mapping

1. Join: (table name) join (table name ) on ( table join relationship ), equivalent to the table to do a Cartesian product, and then filter.

For example

The results are as follows:

In a join, the order of each table is not in sequence

2. Left join: () leave Join () on () to keep the outer row

For example

This writing, will find that the results are missing, there is no professional college can not be found, need to use the left link

Results:

This makes the query complete.

For example:

in the College table, the professional table, the search for the establishment of 4-year professional school and its professional, non-qualified, non-professional colleges (departments) also listed

There is a missing query

and the following

You can complete the query

3. The self-join nature is the same as it is, just the joined table is its own

Such as

Database query • Connect mind map & Essentials & Late (with examples)

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.