首先,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;

  mysql 之full join

insert into t1(`name`)values('zhangsan'),('lisi'),('wangwu'),('zhaoliu'),('dengqi');
insert into t2(`name`)values ('zhaosi'),('wangwu'),('liliu'),('dengqi');

  mysql 之full join

mysql 之full join

 

 mysql 之full join

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-08
  • 2022-12-23
  • 2022-01-17
  • 2021-11-17
猜你喜欢
  • 2022-12-23
  • 2021-12-08
  • 2022-01-30
  • 2021-07-01
  • 2021-08-09
  • 2021-07-07
  • 2021-12-08
相关资源
相似解决方案