How to handle the use of federated operations in a database

Source: Internet
Author: User
How to avoid using federated operations in a database
There are three of tables:
User table:

ID Name
1 Kiven
2 Martin
3 Tina

User_class table:

USER_ID class_id
1 1
2 1
3 2

Class table:

ID Name
1 PHP
2 Java
3. Net


I want to output a table that is structured like this:
User_name Class_name
Kiven PHP
Martin PHP
Tina Java


What should I do without a join union query?
Thank you all first.

------Solution--------------------
Then you just put the data in a table.
But don't say too much redundancy.
------Solution--------------------
The examples in the article are not in accordance with your situation, can not be compared, want to reduce the burden of the database to expand the field
#6的联合查询虽然没用join, but not as efficient as join.
  • 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.