From the course: Oracle Database 19c: Basic SQL

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Subqueries in the WHERE clause

Subqueries in the WHERE clause

From the course: Oracle Database 19c: Basic SQL

Start my 1-month free trial

Subqueries in the WHERE clause

- The WHERE Clause can filter results in many ways. I'll give a high-level overview of what can be in the WHERE Clause, then focus on the most popular and powerful ways to do it. The WHERE Clause itself is very simple, but you can put just about anything but the kitchen sink in there. In the diagram on the slide, I show what can be put into a WHERE Clause. Comparisons, model statements, Pattern-Matching, IS OF Type comparisons, NULL checking, XML and SQL/JSON comparisons, Compound expressions that between operator and many many others. The focus of this lesson will be the EXISTS and IN clause where you can easily and usually put a subquery. Here are the two general types of subqueries, EXISTS and IN. Both can be correlated as we'll see, but the biggest difference is that EXISTS checks for at least one value. IN will check for the existence of one or more column values in the subquery provided. Both can be correlated meaning that one or more columns in the column list of the WHERE…

Contents