mysql-多表查询

  • 子查询:select * from a where id in (select aId from b where name="zhangsan")
    • all/any/exist/in
  • 多表查:select * from a,b where a.id=b.aId
  • 连表查:select * from a inner join b on a.id=b.aId
    • 内连接:交集
    • 左连接:左表+交集
    • 右连接:右表+交集
posted @ 2021-09-23 21:55  花兒向陽開  阅读(24)  评论(0编辑  收藏  举报