O'Reilly logo

OCA Oracle Database 11g: SQL Fundamentals I: A Real-World Certification Guide by Steve Ries

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Examining different types of subqueries

In this section, we will learn how to examine the following types of subqueries:

Using scalar subqueries

Subqueries such as the ones we've seen so far are known as scalar or single-row subqueries because the subquery returns a single value to the outer query. This single value replaces the condition in the WHERE clause. When writing statements that use subqueries, we say that certain types of queries expect either a single value or multiple values. The previous statement expects one value, as the WHERE clause can only be evaluated properly if one value is returned. For instance, let's say that we want a list of websites with the average highest hit counts on Companylink grouped by the website description. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required