Inner left right join statement SQL code CREATE TABLE 'A' ('a1' VARCHAR (10) DEFAULT NULL, 'b1 'varchar (10) DEFAULT NULL, 'c1' VARCHAR (10) default null) ENGINE = innodb default charset = utf8 www.2cto.com create table 'B' ('a2 'VARCHAR (10) DEFAULT NULL, 'b2' VARCHAR (10) DEFAULT NULL) ENGINE = innodb default charset = utf8: The data in the table is as follows: SQL statement execution result image: SQL code below the statement # inner join SELECT. *, B. * FROM a inner join B ON. a1 = B. a2 www.2cto.com SQL code # left join SELECT. *, B. * FROM a left outer join B ON. a1 = B. a2 SQL code # right join SELECT. *, B. * FROM a right outer join B ON. a1 = B. a2 SQL code # full outer join union SELECT. *, B. * FROM a left outer join B ON. a1 = B. a2 UNION www.2cto.com select. *, B. * FROM a right outer join B ON. a1 = B. a2 SQL code SELECT. *, B. * from a, B SQL code SELECT. *, B. * FROM a JOIN B ON. a1 = B. a2 is inner join by default.