create   table   test1(a   int,b   int);  
  create   table   test2(a   int,b   int);  
   
  insert   into   test1   values(1,456);  
  insert   into   test1   values(2,427);  
  insert   into   test2   values(1,45456);  
  insert   into   test2   values(3,45656);  
   
  ---内连接  
  select   *   from   test1   a,   test2   b   where   a.a=b.a;  
   
  ---左连接  
  select   *   from   test1   a,   test2   b   where   a.a=b.a(+);  
   
  ---右连接  
  select   *   from   test1   a,   test2   b   where   a.a(+)=b.a;  
   
  ---完全连接  
  select   *   from  test1   a,   test2   b   where   a.a=b.a(+)  
  union  
  select   *   from   test1   a,   test2   b   where   a.a(+)=b.a;  
   
  ---迪卡尔  
  select   *   from   test1, test2;

相关文章:

  • 2021-10-07
  • 2022-01-26
  • 2021-07-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
猜你喜欢
  • 2021-12-05
  • 2022-02-23
  • 2022-12-23
  • 2022-02-16
  • 2022-02-18
  • 2022-12-23
相关资源
相似解决方案