zoukankan      html  css  js  c++  java
  • simple =, join,left out join,right outer join, cross join

     a. =
           eg.
           Select A.a B.b from A, B where A.a=B.a and A.c=’herengang’;
         under this condition, it only shows the data that A.a=B.a and A.c=”herengang”.
       Although it there is data which .c is “herengang” ,but if we  can’t find such record which .a value equals to A.a in Table B, then it will be cleared.
     b.  left join
        select A.a, B.a 
        from table  A
                 left join table B
                on  A.a =B.a and A.c=”herengang”
           under this condition, all of data which .c is “herengang” will be retrieved, and then if B.a exists, then show the value of B.a .

    e.g Table A                                                Table B
          columnA columnB columnC              columnA columnB columnC    
               1            3            a                       1         'ok'     23.3
               2            4            b                       3          'sorry'    3.0

    A join B (A inner B) ,result is 
         1       3        a      1     'ok'      23.3
    A left join B, result is 
         1       3       a       1    'ok'       23.3
         2       4       b     null   null    null
    A cross join B
          1       3       a      1    'ok'      23.3
          1       3       a      3   'sorry'   3.0
          2       4       b      1    'ok'      23.3
          2       4       b      3    'sorry'    3.0
  • 相关阅读:
    负margin在页面布局中的应用
    2018-05-04 圣杯布局 and 双飞翼布局,display:flex
    vue 动态加载图片路径报错解决方法
    vue 带参数的跳转-完成一个功能之后 之后需要深思,否则还会忘记
    vue项目打包后打开空白解决办法
    css 居中方法
    vue 不用npm下载安装包 该如何引用js
    安装WAMP 及 修改MYSQL用户名 、 密码
    Python 软件开发目录规范
    Python 1-3区分Python文件的两种用途和模块的搜索路径
  • 原文地址:https://www.cnblogs.com/Winston/p/1040997.html
Copyright © 2011-2022 走看看