如何限制Joing表中的重复条目 [英] How to restrict duplicate entry from joing table

查看:75
本文介绍了如何限制Joing表中的重复条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在查询中遇到了一些问题.我有两个表tbl_summary和publishinfo.
我想通过两个表中的联接显示数据.显示数据必须是多个相同的记录,才能显示一个记录,并且该记录还存储了一个记录,然后又显示了一个记录.在这两个表中,常见的是artid和catid. publishinfo表仅包含artid和catid列.所有详细信息都存储在tbl_sumary表中.

请提出建议并帮助我.

谢谢
Narendra kumar

Hi All,

I am facing some problem in a query. I have two table tbl_summary and publishinfo.
I want to display data through join from both tables. Display data must be multiple same record display one record and which that stored single record then single record also displayed. In both tables common are artid and catid. publishinfo table only contains artid and catid columns. All details are stored in tbl_sumary table.

Please suggest and help me.

Thanks
Narendra kumar

推荐答案

对于sql中的单个记录实例,您可以使用Distinct关键字
以下链接将为您提供帮助

http://blog.sqlauthority.com/2007/03/29/sql-server-difference-between-distinct-and-group-by-distinct-vs-group-by/ [
To single instance of record in sql you can use Distinct key word
The below link will help you

http://blog.sqlauthority.com/2007/03/29/sql-server-difference-between-distinct-and-group-by-distinct-vs-group-by/[^]


这篇关于如何限制Joing表中的重复条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆