Access2000数据库中distinct参数好象不起作用??

bushido 2003-08-19 05:40:57

select p.smallimg,p.id,p.name,p.prod_cd,p.marketprice,p.multi_pic from productsort c right outer join product p on p.productsort=c.id where c.fatherid=187 and p.smallimg in(select distinct smallimg from product) order by p.id desc
我测试过,不行,
当然只是用select distinct smallimg from product 是可以的

我又用
select distinct p.smallimg,p.id,p.name,p.prod_cd,p.marketprice,p.multi_pic from productsort c right outer join product p on p.productsort=c.id where c.fatherid=187 也不行

又加了group by还是不行
...全文
75 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
bushido 2003-08-20
  • 打赏
  • 举报
回复
有道理,我咋没想到呢
xuzuning 2003-08-20
  • 打赏
  • 举报
回复
请移贴至 数据库开发——Access
bushido 2003-08-20
  • 打赏
  • 举报
回复
我的意思是
select distinct XXX from table当然是可以的
只是想一并取出其它字段时则不对
比如说
select distinct xxx,yyy from table就不对了
我改成 select xxx,yyy from table where xxx in(select distinct XXX from table)
竟然也不对。气坏了

help me
bushido 2003-08-20
  • 打赏
  • 举报
回复
up

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧