MySQL connection query, encapsulating MySQL function

Source: Internet
Author: User

Connection Query

cross-Connection syntax : SELECT * | Field List from Table 1 Cross Join Table 2

inside  Connection: Select *| Field list from the left table inner join right table on the left table. field = Right table. field; (inner can be omitted)

Left OUTER join (left connection) Select *| Field list from the left table to the left OUTER join right table on the Open table. field = Right table. field; (outer can be omitted)

Right outer join (right connection)     select *| Field list from right table left outer join right table. field = left table. field;

Natural Internal Connection Select *| Field left table natural join right table;    The natural inside connection is actually the inner connection, but the condition here is automatically specified by the system

Natural left OUTER join Select *| Field left table natural right table;

Natural right outer join Select *| Field left table natural Right join table;

encapsulate a MySQL function of its own

Application:  

Output Result:

Display in the database:

MySQL connection query, encapsulating MySQL function

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.