select * (select ((case when 数学 is not null)+ (case when 语文 is not null)+(case when 英语 is not null))as 总分,数学,语文,英语 from 分数表 ) from 总分<180 这个查询可不可以简化一下 条件如上。最好能不用嵌套直接查。请搞手解决一下!
解决方案 »
- ORA-12541:TNS:无监听程序”错误
- toad中如何查看输出语句?
- 泪眼求助,怎么导入不同数据库下,不同用户名的dmp文件
- 数据库备份与回复?
- 关于用sqlplus调用存储过程,救救小妹我吧
- >>>>>>>救救我吧!! oracle恢复数据问题,数据库文件都存在!
- 请教关于日志分析工具logminer的问题
- ref cursor问题
- 这个错误该如何解决ORA-01045:user song lacks CREATE SESSION privilage;logodenied
- 请教如何将Oracle存储函数转为java方法?
- sql语句问题,求帮忙!
- Oracle 9i DES算法加密后无法解密
FROM 分数表
WHERE (NVL(数学, 0) + NVL(语文, 0) + NVL(英语, 0)) < 180
(case when 英语 is not null)) as 总分,数学,语文,英语
from 分数表)
where ((case when 数学 is not null) + (case when 语文 is not null) +
(case when 英语 is not null)) > 180
(case when 英语 is not null)) as 总分,数学,语文,英语
from 分数表
where ((case when 数学 is not null) + (case when 语文 is not null) +
(case when 英语 is not null)) > 180
不小心,多了一个括号
SELECT NVL(数学,0)+NVL(语文,0)+NVL(英语,0) 总分,数学,语文,英语
FROM 分数表
WHERE NVL(数学,0)+NVL(语文,0)+NVL(英语,0) < 180