Subquery

External Article

Three Use Case Examples for SQL Subqueries

  • Article

There are many great tutorials on syntax, performance, and keywords for invoking subqueries. However, I wish to discover a tip highlighting selected SQL subquery use cases. Please briefly describe three SQL subquery use case examples. For each use case, cover how a subquery interacts with outer queries and the T-SQL for implementing the use case. Review excerpts from each example to show the value of implementing the use case.

2023-04-14

Stairway to T-SQL Beyond The Basics

Stairway to T-SQL: Beyond The Basics Level 3: Building a Correlated Subquery

  • Stairway Step

This stairway level will expand on the subquery topic by discussing a type of subquery known as a correlated subquery, and explores what a correlated subquery is and how it is different from a normal subquery.

3.67 (3)

You rated this post out of 5. Change rating

2019-05-08 (first published: )

20,214 reads

Blogs

Friday Basics: the CIA Triad

By

In information security (INFOSEC), there several foundational concepts and principles. One of the ones...

A New Word: the standard blues

By

the standard blues– n. the dispiriting awareness that the twists and turns of your...

How Redgate Flyway Can Boost Your DevOps Journey

By

A brief introduction to the tool and its advantages for database migrations DevOps is...

Read the latest Blogs

Forums

One more reason to use foreign key constraints

By Louis Davidson (@drsql)

Comments posted to this topic are about the item One more reason to use...

client_app_name is empty in Extended Events output but present in sp_who2

By Pete Bishop

I'm tracing activity on one database and would like to include the client_app_name in...

How to compare data in customer table with other customers to find related cust

By Zond Sita

select Custno, Addr1, City, Res_Phone, Bus_Phone, Fax_Phone, Marine_Phone, Pager_Phone, Other_Phone, email1, email2 from customer...

Visit the forum

Question of the Day

The Marked Transaction

I want to mark a transaction in the log as a recovery point. How do I do this in my code if I use the transaction, myTran?

See possible answers