"MySQL" Federated query

Source: Internet
Author: User

1. Three-table joint query select Xx,xx from a, B, C Cartesian product, equivalent to cross join 4. Cross join--lists all combinations on both sides, also called Descartes set A.rows * b.rowsselect *from Sales S Cross join Customers C 5. INNER JOIN = join--Both sides are filtered out select *from Sales S inner JOIN Customers Con s.cust_id = c.cust_id 2. Left join = outer join--with the table on the main table, lists all records of the primary table, matches the match, matches with null list select * FROM Customers C left join sales son c.cust_id = S.CUST_ID 3. Right join = Outer join--takes the table on the left as the main table, lists all records of the primary table, matches the match, matches the mismatch with null, lists the SELECT * from the Customers C right join sales son c.cust_i D = s.cust_id 6. Full join = Full outer join--are listed on both sides, matching on match, mismatched with null list select *from Sales S full outer join Customers Con s.cust_id = C.cus t_idExample ======================SELECT a.id, rule_id, Alarm_name, Filter_key, A.subtype, B.name
From (A
Left JOIN B on a.subtype = b.id)
JOIN C on c.alarm_type = A.type

"MySQL" Federated query

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.