小计--关联 复制表结构

--关联语句  内关联 

select t1,t2 from  test1,test2 where test1.1=test.2.1 



select ti,t2 from test1 join  test2  on test1.1=test.2.1 


 --外关联  左关联  右关联  全关联
 
 
 
 select t1,t2 from test1  left join test2  on test1.1=test.2.1 
 
 select t1,t2 from test1  right join test2  on test1.1=test.2.1 
 
 select t1,t2 from test1  full join test2  on test1.1=test.2.1 
 
 
 --自关联
 
 
  
 select t1,t2 from test1 w,test2 c where w.t1=c.t2
 
 
 
 --快速复制表结构
 
 
 select into  new  from   old --复制过来的结构没主键
 
原文地址:https://www.cnblogs.com/hanke123/p/4771843.html