- 6
- 0
- 约9.44千字
- 约 12页
- 2017-06-20 发布于湖北
- 举报
MySQL左连接、右连接和内连接详解以MySql为例。在MySQL数据库中建立两张数据表,并分别插入一些数据。示例脚本如下: 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(
原创力文档

文档评论(0)