如何在SQL表中查找匹配的数据 [英] How to find the matching data in SQL Table

查看:97
本文介绍了如何在SQL表中查找匹配的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
在我的应用程序中有一个调查表..并且我给了这些问题的答案选项...所以当用户保存数据时,答案号和问题号将存储在表中...所以我想检查谁对于一个特定的问题,所有这些用户都被标记为相同的答案.在这里,我传递了userid,表中应该存在no_of_matches.使用PL SQL存储过程.因此,该过程应获取输入的用户ID,并获取问题和该用户ID的答案,然后检查其他人的答案是否相同...这里重要的一点是,传递至少5个或10个或所有匹配项之类的不匹配项.
在此先感谢...

Hi there,
In my application there is a questionnaire.. And i have given answer options for that questions...so when user save the data,the answer number along with question number will be stored in the table...so i want to check who all are the users marked the same answer,for a particular question.. Here I pass userid and no_of_matches should exist in the table..with PL SQL stored procedure..so the procedure should get the input user id,and get the question and answers of that userid then to check who others have the same answer...here one important thing is to pass the no of matches like atleast 5 or 10 or all matches..
Thanks in advance...

推荐答案

亲爱的朋友
如果已登录的用户与所接受的问题之间存在任何关系,则只需使用联接来获取数据
Dear Friend
if there is any relation between logged in user and questions took then its simple just use joins for fetching the data


这篇关于如何在SQL表中查找匹配的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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