这样写a,b表:
select a.col_a,b.col_b from a inner join b on a.pk_uq_ID_a=b.pk_uq_id_b
where clause

解决方案 »

  1.   

    内连接 select a.field1,b.field2 from a join b on a.id=b.id,只有a,b中id相同的记录才出现 
    左连接: select a.field1,b.field2 from a left join b on a.id=b.id,只要a中存在的的记录都出现。如果a中存在,b中不存在,出现的结果中b表中的字段显示为null
    右连接,全连接依次类推。
      

  2.   

    例如:
    table1                       table2
    id    desc                   id         chinese
    1     one                    1          一
    2     two                    2          二
    3     three                  3          三
    4     four                   4          四
    则:
    select a.desc, b.chinese from table1 a, table2 b where a.id = b.id;
    结果就是:
    desc          chinese
    one           一
    two           二
    three         三
    four          四
      

  3.   

    我的意思是就想是在access2000里面一样 我在关系视图里面建立2个表的关系
    一个表有主健,一个表有外建的那种,
      

  4.   

    在sql2000中很简单的呀,在企业管理器中,有个,digram双击就可以设置
      

  5.   

    select 属性名
    from 关系名
    where 主键=外键    
      

  6.   

    建个视图  把里面的代码copy出来就是了!