Use group by to solve the problem of querying from and from multiple tables in MySQL

Source: Internet
Author: User

How can I solve the problem of restoring MySQL multi-join table queries? The following describes how to solve the problem of restoring MySQL multi-join table queries. We hope this will help you learn MySQL multi-join table queries.

------------------------------------- Group by solution --------------------------------------

 
 
  1. SELECT dede_addonarticle.aid, dede_addonarticle.typeid,  
  2.  
  3. dede_addonarticle.body,dede_archives.typeid,dede_archives.title  
  4. FROM dede_addonarticle,dede_archives  
  5. WHERE dede_addonarticle.typeid = 29 and dede_addonarticle.typeid = dede_archives.typeid  
  6.  

As in the preceding query method, the nth power of the slave node appears.

Bytes -------------------------------------------------------------------------------------------------

 
 
  1. SELECT dede_addonarticle.aid, dede_addonarticle.typeid, dede_addonarticle.body,dede_archives.typeid,dede_archives.title  
  2. FROM dede_addonarticle,dede_archives   
  3. where dede_addonarticle.typeid = 29 
  4. GROUP BY dede_addonarticle.aid  
  5.  

Group by can solve the problem of auto-recovery. dede_addonarticle.aid is where the auto-recovery occurs.
 

Implementation of MySQL multi-Table Deletion

Advantages and disadvantages of MySQL independent tablespace

Case sensitivity of mysql Databases

Restoration of MySQL MyISAM Table Structure

In-depth parsing MySQL Association Table Creation

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.