zoukankan      html  css  js  c++  java
  • mysql数据库(11)--进阶一之join

    一、查看存储引擎

    show variables like '%storage_engine%';

    二、MyISAM与InnoDB的比较

     三、SQL书写顺序  vs 执行顺序

     

     四、Join连接(7种)

    • 内连接:select <select list>  from tableA inner join tableB on A.key = B.key
    • 左连接:select <select list>  from tableA left join tableB on A.key = B.key  (不满足的补NULL)
    • 右连接:select <select list>  from tableA right join tableB on A.key = B.key  (不满足的补NULL)
    • 左连接-内连接:select <select list>  from tableA left join tableB on A.key = B.key where B.key is NULL
    • 右连接-内连接:select <select list>  from tableA right join tableB on A.key = B.key where A.key is NULL
    • 全外连接= A独有+B独有+A、B共有:
      •   select <select list>  from tableA left join tableB on A.key = B.key union select <select list>  from tableA right join tableB on A.key = B.key  (union具有去重的功能)
    • 全外连接-内连接:
      •   select <select list>  from tableA left join tableB on A.key = B.key where B.key is NULL union select <select list>  from tableA right join tableB on A.key = B.key where A.key is NULL (union具有去重的功能)
  • 相关阅读:
    IOS Application生命周期
    IOS ViewController 生命周期
    nsinteger 与 int 区别
    判断日期是昨天,今天,明天,后天,其他的显示星期
    改变图片颜色(灰色显示)
    Linux系统管理
    PHP 相关软件下载
    检查域名是否正确解析网站
    定时任务
    BZOJ 3534 [Sdoi2014]重建
  • 原文地址:https://www.cnblogs.com/yif930916/p/15040375.html
Copyright © 2011-2022 走看看