欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

mysql 左连接、右连接和内连接_MySQL

程序员文章站 2023-12-30 20:39:40
...
bitsCN.com 脚本如下:
drop table table1;
CREATE TABLE `andrew`.`table1`
(
`name` VARCHAR(32) NOT NULL,
`city` VARCHAR(32) NOT NULL
)
ENGINE = MyISAM;
insert into TABLE1(name, city) values ('Person A', 'BJ');
insert into TABLE1(name, city) values ('Person B', 'BJ');
insert into TABLE1(name, city) values ('Person C', 'SH');
insert into TABLE1(name, city) values ('Person D', 'SZ');
commit;
drop table table2;
CREATE TABLE `andrew`.`table2`
(
`name` VARCHAR(32) NOT NULL,
`city` VARCHAR(32) NOT NULL
)
ENGINE = MyISAM;
insert into TABLE2(name, city) values ('Person W', 'BJ');
insert into TABLE2(name, city) values ('Person X', 'SH');
insert into TABLE2(name, city) values ('Person Y', 'SH');
insert into TABLE2(name, city) values ('Person Z', 'NJ');
commit;
1. 外连接
相关标签: values mysql

上一篇:

下一篇: