当前位置: 动力学知识库 > 问答 > 编程问答 >

Access query parameter with or condition

问题描述:

I want to know how we can accept one parameter from the two columns with OR condition. I want to ask for either PRN no or roll number and show the result.I am trying following query but won't work,

SELECT StudentInfo.*, StudentInfo.PRNNo, StudentInfo.StudentRollNo

FROM StudentInfo

WHERE (((StudentInfo.PRNNo)=[Enter PRN No :]) OR ((StudentInfo.StudentRollNo)=[Enter Roll No :]));

Here AND condition works properly and asks for both the PRN no and Roll No.But i want ask either PRN or roll no, how we can achieve this

分享给朋友:
您可能感兴趣的文章:
随机阅读: