急求SQL的多表操作的SQL的文档谢谢
那位大狭有SQL的连接查询的基础教程 给小弟发一份电子文档 [email protected]

解决方案 »

  1.   


    create  table  test_a  (a  int,  b  int)  
    go  
    create  table  test_b  (a  int,  b  int)  
    go  
    insert  test_a  values  (1,1)  
    insert  test_a  values  (2,1)  
    insert  test_a  values  (3,1)  
    go  
    insert  test_b  values  (4,1)  
    insert  test_b  values  (2,1)  
    insert  test_b  values  (3,1)  
    go  
    select  test_a.*  ,test_b.*  from  test_a  left  join  test_b  on  test_a.a=test_b.a  
    select  test_a.*  ,test_b.*  from  test_a  right  join  test_b  on  test_a.a=test_b.a  
    select  test_a.*  ,test_b.*  from  test_a  inner  join  test_b  on  test_a.a=test_b.a  
    select  test_a.*  ,test_b.*  from  test_a  full  join  test_b  on  test_a.a=test_b.a  
    go
    drop  table  test_a  
    go  
    drop  table  test_b  
    go
      

  2.   

    你可以看下SQL的联机帮助,这个是学习SQL最好的资料
      

  3.   

    这里有个<全面接触SQL语法>的一系统说明,应该对你有些帮助:http://edu.59131.com/shujuku/ms_sql/5500.html