请教一个left JOIN去除重复的问题

a11529182 a11529182 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
我原来的是
SELECT top 8 * from PE_Article left JOIN PE_Comment on PE_Comment.InfoID=PE_Article.ArticleID where ChannelID=1002 Order By ArticleID desc
可以查询出8条数据,但是会把有重复的也显示出来

PE_Article
中的ArticleID ChannelID ClassID Title TitleIntact Subheading Author CopyFrom Inputer LinkUrl Editor Keyword Hits CommentCount UpdateTime CreateTime OnTop Elite Status Content IncludePic DefaultPicUrl UploadFiles InfoPoint PaginationType Deleted SkinID TemplateID Stars TitleFontColor TitleFontType MaxCharPerPage ShowCommentLink Receive ReceiveUser Received AutoReceiveTime ReceiveType Intro PresentExp Copymoney IsPayed Beneficiary PayDate VoteID InfoPurview arrGroupID ChargeType PitchTime ReadTimes DividePercent BlogID

pe_comment
中是 CommentID ModuleType InfoID UserType UserName Sex OICQ MSN ICQ Email Homepage IP WriteTime Score Content ReplyName ReplyContent ReplyTime Passed


不知道高手们看的懂不,我是新手,让我整理太难了, InfoID中如果有重复数据的话,会显示重复数据,我觉得就是应该在PE_Comment.InfoID=PE_Article.ArticleID比较之前就把InfoID中重复的值去掉,请高手帮忙写个列子吧,access数据库
...全文

相关推荐

评论 18
收藏 已收藏
分享
返回顶部
a11529182
MS-SQL Server 34,876 成员 254,635 内容