首页 > 数据库技术 > 详细

mysql三表查询

时间:2021-09-17 16:24:20      阅读:47      评论:0      收藏:0      [点我收藏+]

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三表查询

原文:https://www.cnblogs.com/csjoz/p/15302957.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!