mysql 之full join

2022-10-15,,

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

  

mysql 之full join的相关教程结束。

《mysql 之full join.doc》

下载本文的Word格式文档,以方便收藏与打印。