两个表或多个表 查询, 谁能给个怎么查询SQL语句啊??

解决方案 »

  1.   

    select a.*,b.*,c.* from a ,b ,c where a.id = b.id and b.id = c.id
    是这个意思么
      

  2.   

    where 后跟关联条件就行
    或者你用 left on ,right on, inner on ==...
      

  3.   

     能说的详细点么??????? 你自己定义4个表 A,B,C,D,然后你写一个查询这4个表的一个SQL语句 好么????? 谢谢了!!!
      

  4.   

    select
       *
    from
       a join b on a.id=b.id
         join c on b.id=c.id
         join d on c.id=d.id
      

  5.   

    用连接查询。看什么需求了,左右连接,自然连接。create table a(id int,id1int,aa varchar(10))
    create table b(id1 int,id2 int,bb varchar(10))
    create table c(id2 int,id3 intcc varchar(10))
    create table d(id3 int,dd varchar(10))select a.aa,b.bb,c.cc,d.dd from a,b,c,d where a.id1=b.id2 and b.id2=c.id2 and c.id3=d.id3
      

  6.   

    select  .... from  a,b,c,d where a.col1=b.col1 and b.col1=c.col1 and c.col1=d.col1
      

  7.   

    select A.*,B.* from A,B where A.id=B.id 或者select A.*,B.* from A left join B on A.id=B.id