SQL查询以检查多个条件并返回单行 [英] SQL query to check multiple condition and return single row

查看:90
本文介绍了SQL查询以检查多个条件并返回单行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一张桌子,上面有所有学科的学生成绩,现在我想获得那些连一个学科都没有失败的学生的成绩单,我需要检查一个学生是否在所有学科中都通过了考试.怎么做,请帮助我...

I have a table where I have marks of students of all subjects, now I want to get rollno of those students who are not failed in even one subjects, I need to check that whether a students is pass in all subjects or not. how to do so plz help me...

推荐答案

Select * from tblmarks WHERE marksubject1>40 AND marksubject2>40 AND marksubject3>40 AND marksubject4>40;


这样的事情会起作用.
由于我没有您的表格结构,因此只能猜测查询.


Something like this will work.
Since I do not have your table structure I can only guess the query.


这篇关于SQL查询以检查多个条件并返回单行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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