Subqueries

SubQueries

Over here at EssentialSQL I’ve written many articles about subqueries.

Why?

Subqueries are versatile and I want to make sure you’re able to use them!  Of course, its that versatility which make them so baffling at times.

Did you know you can use a subquery just about anywhere in your SELECT statement?  I think that is what makes them so confusing.

To help with this I’ve put together a good article I want you to read  Introduction to Subqueries.

In this article I cover how subqueries work, where you can use them, and some tricks you can use to make your queries less “hard coded” and more robust.

I think one think that makes subqueries so confusing is they can either a single or multiple result.  And because of this, you need to know where you can use them!  For instance, subqueries returning multiple rows in SELECT clause will fail!

To learn about this important distinction, check out these two popular articles:

Do Sub queries got you perplexed?  New a little more help?

We cover subqueries and more in our course FearlessSQL.  If you’re looking to take your SQL to the next level, you owe it to yourself to check out this awesome course.

OK… still looking for more Subquery help?  Well how about trying out some of our free Subquery Tutorials.

or you can get started using these free tools using my guide Getting Started Using SQL Server

Recommended Sub Query Articles