MySQL 5. Subqueries and Links

Source: Internet
Author: User

SQL: Structured Query Language

Sub-query:

  • Subqueries are nested inside a query and must always appear inside parentheses
  • A subquery can contain multiple keywords or conditions, such as distinct, GROUP by, ORDER by, LIMIT, function, and so on.
  • The outer query of a subquery can be a generic term for all of the SQL commands that we know.

In the following example, select * FROM table1 is called outer query/out Statement

SELECT col2 from Table2 called subquery

1 SELECT *  from WHERE = (SELECT from table2);

A subquery can return a scalar, a row, a column, or a subquery

MySQL 5. Subqueries and Links

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.