Home  >  Article  >  Database  >  循序渐进学Oracle之复杂查询(重点)

循序渐进学Oracle之复杂查询(重点)

WBOY
WBOYOriginal
2016-06-07 17:38:001075browse

前言在实际应用中经常需要执行复杂的数据统计,经常需要显示多张表的数据,故必须要高度重视:复杂的select语句!1-数据分组的重要函数:max、min、avg、sum、count(1

前言

在实际应用中经常需要执行复杂的数据统计,经常需要显示多张表的数据,故必须要

范例:

073703694.jpg

没有40部门,我们换成RIGHT JOIN…ON ,如下图所示:

073949376.jpg

由上可知:40部门出现了!

Oracle之外的数据库(SQLSERVERMYSQLDB2等)都使用以上的SQL1999语法操作,故必须要会!(当然,,一直使用Oracle数据库,就可以不会:))

再次强调:多表查询的性能肯定不高,而且性能一定要在大数据量的情况下,才能发现。


本文出自 “beyondhedefang” 博客,请务必保留此出处

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn