MySQL Federated query two tables of data

Source: Internet
Author: User
MySQL Federated query 2 tables of data
There are 2 tables tb_a tb_b (2 table relationship is A.id=b.tid) how to implement the data of the page with a SQL statement to find out the college and the college teachers in the table field is to write their own random
Page first accept the ID of a college and then query: Ask for a SQL to find out the data needed for the page


------Solution--------------------
SELECT * from Tb_a A, Tb_b b where a.id=b.tid
------Solution--------------------
What do you mean by tb_a,tb_b? Landlord did not say clearly
------Solution--------------------
The second floor is the solution ah.
------Solution--------------------
Big table? Small, you can use the table, big words, first draw a table, in their own implementation of the logical extraction of the second

  • 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.