Mysql--5 Sub-Query and connection summary

Source: Internet
Author: User
Tags joins

Subquery: A select that appears in other SQL statements must appear inside the parentheses, the outer layer of the subquery can be a common SELECT statement, and the INSERT statement UPDATE statement DELETE statement can contain multiple keywords and conditions in the subquery (for example, ORDER by, LIMIT), and related functions.

3 ways to raise a subquery: comparison operator, in or not in, EXISTS, or not EXISTS

Connections: SELECT statements in MySQL, multi-table updates, and multiple table deletions can all use connections.

The connection is divided into inner join inner JOIN outer JOIN outer JOIN.

Inner joins: Displays records in both the left and right tables that meet the join criteria.

Outer joins: Left outer (all records in the left table and records with join conditions in the right table) right (all records in the right table and records in the left table that match the join criteria)

Mysql--5 Sub-Query and connection summary

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.