创建实验环境
create database test;
use test;
create table ta (aid int(1),aname(5));
insert into ta values('1','1001');
insert into ta values('2','1002');
insert into ta values('3','1003');
insert into ta values('4','1004');
insert into ta values('5','1005');
create table tb (bid int(2),bname(5));
insert into tb values('1','2001');
insert into tb values('2','2002');
insert into tb values('3','2003');
insert into tb values('4','2004');
insert into tb values('8','2005');
查看两表
select * from ta;
+------+-------+
| aid | aname |
+------+-------+
| 1 | 1001 |
| 2 | 1002 |
| 3 | 1003 |
| 4 | 1004 |
| 5 | 1005 |
+------+-------+
select * from tb;
+------+-------+
| bid | bname