技术文章分类(180)

技术随笔(11)

文章分类 -  sql

摘要:表brand0:表brand1:想要结合表brand0和表brand1,得到如下结果:解决办法:法1、SELECT brand0.brand_id ,brand0.clickCount,brand1.saleCount FROM brand0 LEFT JOIN brand1 ON brand0.brand_id=brand1.brand_id UNION SELECT brand1.brand_id ,brand0.clickCount,brand1.saleCount FROM brand0 RIGHT JOIN brand1 ON brand1.brand_id=brand0.... 阅读全文
posted @ 2014-03-25 11:12 坤哥MartinLi 阅读(128) 评论(0) 推荐(0) 编辑