zoukankan      html  css  js  c++  java
  • inner join 多表查询

    三表以及三表以上联合查询:

    select table1.ziduan1,table2.ziduan,2,table3,ziduan3
    from table1 inner join table2 
    on table1.field1 = table2.field1 
    inner join table3 
    on table1.field1 = table3.field1
    

     举例: 

    select clFile.FILEPATH,clPerson.personcode,cailiao.clcode 
        from clFile inner join clPerson 
        on clFile.PGUID = clPerson.MGUID
        inner join cailiao 
        on clPerson.MGUID = cailiao.clGuid";

    俩表联合查询:

    select * FROM 
        表1 INNER JOIN 表2 
        ON 表1.字段号=表2.字段号
    

     举例:

    select * from CaiLiao inner 
        join clCode 
        on CaiLiao.clCode=clCode.code 
        where CaiLiao.clGUID 
        in (select mGUID from clPerson where pcode = '123' )                  
    

      

    你以后的气质里,藏着你走过的路,读过的书和爱过的人。 ​​​
  • 相关阅读:
    #include <boost/scoped_ptr.hpp>
    #include <boost/function.hpp>
    #include <boost/bind.hpp>
    8.4散列表查找
    #include <boost/array.hpp>
    异常
    lambda
    #include <amp.h>
    #include <bitset>
    #include <hash_set>
  • 原文地址:https://www.cnblogs.com/Sophias/p/7577226.html
Copyright © 2011-2022 走看看