EPISODE · Jun 25, 2014 · 48 MIN
The SQL Subquery
from How to Program with Java Podcast · host Trevor Page: Java Guru | Programmer | Teacher
The SQL Subquery Now that you've learned about SQL Joins, aggregate functionsand the group by keyword, it's time we moved on to our final topic in our SQL tutorial series. Today you'll be learning all about SQL Subqueries, how to use them and when you should use a SQL subquery. So, what is a subquery? First and foremost, let's get the jargon out of the way. A subquery can also be referred to as a nested query. It's just like having a nested if statement in your Java code. Essentially what you're doing with a subquery is you are constructing a regular old query (select statement) which could be run all by itself if you wanted to, but instead of running it all by itself, you're jamming it into another query (select statement) to give you more specific (filtered) results. What's very important to note here is that the SQL subquery can almost always be re-written as a join with a whereclause attached to it. More info on this via http://howtoprogramwithjava.com/session49
What this episode covers
The SQL Subquery Now that you've learned about SQL Joins, aggregate functionsand the group by keyword, it's time we moved on to our final topic in our SQL tutorial series. Today you'll be learning all about SQL Subqueries, how to use them and when you should use a SQL subquery. So, what is a subquery? First and foremost, let's get the jargon out of the way. A subquery can also be referred to as a nested query. It's just like having a nested if statement in your Java code. Essentially what you're doing with a subquery is you are constructing a regular old query (select statement) which could be run all by itself if you wanted to, but instead of running it all by itself, you're jamming it into another query (select statement) to give you more specific (filtered) results. What's very important to note here is that the SQL subquery can almost always be re-written as a join with a whereclause attached to it. More info on this via http://howtoprogramwithjava.com/session49
NOW PLAYING
The SQL Subquery
No transcript for this episode yet
Similar Episodes
Mar 26, 2026 ·1m
Mar 19, 2026 ·34m
Feb 18, 2026 ·11m
Feb 11, 2026 ·45m