开发者社区 问答 正文

关于MySQL的索引建立

我建立 packag 資料夾 3種Table A,B,C

1.id | name | password |  UserName | UserPhone    A

2.id | name | classProject | thingGet2 |  thingGet1    B

3.id | name | classProject | thingGet3 |  thingGet4    C

我該如何讓資料可以順利查詢

下面是我要的資料

name | classProject | thingGet2 | thingGet1 | thingGet3 | thingGet4 | UserName | UserPhone

該如何select

反之

一筆資料 同上 如何以一次的 Insert 存入

(未回答之前~先行感謝)

展开
收起
小旋风柴进 2016-03-10 16:33:55 2158 分享 版权
1 条回答
写回答
取消 提交回答
  • select a.name
    ,b.classProject,b.thingGet2,b.thingGet1,c.thingGet3,c.thingGet4,a.usernme,a.userphone
    from a left join b on a.name=b.name left join c on a.name=c.name


    screenshot

    2019-07-17 18:57:53
    赞同 展开评论