Mysql has a one-to-multiple relationship, which combines multiple items and displays all the content (group_concat () method and group)

Source: Internet
Author: User


Mysql has a one-to-multiple relationship. Multiple items are combined to display all the content (group_concat () method and group by). mysql has a one-to-multiple relationship, combine multiple items into one and display all the content (group_concat () method and group by): for example, group the expert technical direction table according to the expert Id, all technical directions of the expert are displayed.

Select sbes. expert_id, group_concat (sbes. skill_direction) as skillDirectionStr from shtic_base_expert_skill sbes where sbes. flag = 0 group by sbes. expert_id

 

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.