mysql 之full join
首先,mysql中是不支持full join的,如果要实现类似的功能可以用union all,union会剔除重复。以下是实现实例
create table if not exists t1(`id` int(10) not null auto_increment,`name` varchar(20),primary key(`id`))ENGINE=MYISAM; create table if not exists t2(`id` int(10) not null auto_increment,`name` varchar(20),primary key(`id`))ENGINE=MYISAM;
  
insert into t1(`name`)values('zhangsan'),('lisi'),('wangwu'),('zhaoliu'),('dengqi');
insert into t2(`name`)values ('zhaosi'),('wangwu'),('liliu'),('dengqi');
  

 
                    
                
                
            
        
浙公网安备 33010602011771号