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具有去重的功能)
  • 相关阅读:
    EasyUI--Alert()
    asp.net 页面之间传值的几种方式
    c# 的类成员
    c# protected public private internal
    C#中的多态性
    c# 静态成员和实例成员的区别
    js确认框confirm()用法实例详解
    JS中的switch case
    分分钟用上C#中的委托和事件
    Asp.net MVC中关于@Html标签Label、Editor使用
  • 原文地址:https://www.cnblogs.com/yif930916/p/15040375.html
Copyright © 2011-2022 走看看