博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

两表相连去除重复数据

Posted on 2011-06-12 19:54  moss_tan_jun  阅读(246)  评论(0编辑  收藏  举报
select p.product_id,max(i.ImagesPath) ImagesPath from teapp as p,Base_Images as i

 where p.Product_id=i.Product_Id  group by p.product_id