mysql三表查询

SELECT a.city,b.realname,b.address,c.goodsid FROM ims_ewei_shop_member a,ims_ewei_shop_member_address b,ims_ewei_shop_member_cart c where a.openid=b.openid and a.openid=c.openid
SELECT a.city,b.realname,b.address,c.goodsid FROM (ims_ewei_shop_member a JOIN ims_ewei_shop_member_address b on a.openid=b.openid) JOIN ims_ewei_shop_member_cart c on a.openid=c.openid 
select username,psw,gname,tel from (t1 left join t2 on t1.t1_id=t2.t1_id) left join t3 on t1.t1_id=t3.t1_id

 

SELECT a.city,b.realname,b.address,c.goodsid,d.title FROM ims_ewei_shop_member a,ims_ewei_shop_member_address b,ims_ewei_shop_member_cart c,ims_ewei_shop_member_favorite d where a.openid=b.openid and a.openid=c.openid and a.openid=d.openid
SELECT a.city,b.realname,b.address,c.goodsid,d.title FROM ((ims_ewei_shop_member a JOIN ims_ewei_shop_member_address b on a.openid=b.openid) JOIN ims_ewei_shop_member_cart c on a.openid=c.openid)  JOIN ims_ewei_shop_member_favorite d on a.openid=d.openid
select username,psw,gname,tel from (t1 left join t2 on t1.t1_id=t2.t1_id) left join t3 on t1.t1_id=t3.t1_id

mysql三表查询

上一篇:Oracle dg 状态校验


下一篇:java