About 115,000 results
Open links in new tab
  1. 5 SQL Subquery Examples - LearnSQL.com

    Nov 18, 2021 · In this article, I provide five subquery examples demonstrating how to use scalar, multirow, and correlated subqueries in the WHERE, FROM/JOIN, and SELECT clauses. A subquery, or nested query, is a query placed within another SQL query.

  2. SQL | Subquery - GeeksforGeeks

    Apr 14, 2025 · What is SQL Subquery? In SQL, a subquery can be defined as a query embedded within another query. It is often used in the WHERE, HAVING, or FROM clauses of a statement. Subqueries are commonly used with SELECT, UPDATE, INSERT, and DELETE statements to achieve complex filtering and data manipulation. They are an essential tool when we need to ...

  3. SQL Subquery - SQL Tutorial

    Summary: In this tutorial, you’ll learn how to use SQL subqueries to form flexible queries for retrieving data from the database. A subquery is an SQL query nested inside another query. The query that contains a subquery is known as an outer query. To write a subquery, you need to have a deep understanding of the SELECT statement: select_list.

  4. SQL Subquery (With Examples) - Programiz

    SQL subqueries are queries inside another query.

  5. SQL Server SUBQUERY with Examples - SQL Server Tutorial

    The objective of this SQL Server tutorial is to teach you how to use a SUBQUERY in a SQL statement to expand the scope of operation of the statement and to narrow its focus with respect to the output and get more specific output.

  6. SQL Subqueries - w3resource

    Feb 13, 2025 · A subquery is a SQL query nested inside a larger query. The subquery can be nested inside a SELECT, INSERT, UPDATE, or DELETE statement or inside another subquery. A subquery is usually added within the WHERE Clause of another SQL SELECT statement. You can use the comparison operators, such as >, <, or =.

  7. SQL Subquery Practice: 15 Exercises with Solutions

    Dec 12, 2023 · In this article, we present various ways of employing subqueries to create complex queries. We start by introducing SQL subqueries along with common use cases. Then we’ll walk you through 15 SQL subquery practice exercises – complete with solutions and explanations.

  8. The Ultimate Guide To SQL Server Subquery - SQL Server Tutorial

    Summary: in this tutorial, you will learn about the SQL Server subquery and how to use the subquery for querying data. A subquery is a query nested inside another statement such as SELECT, INSERT, UPDATE, or DELETE. Let’s see the following example. Consider the orders and customers tables from the sample database.

  9. 10 Example of SubQuery in SQL - SQLrevisited

    Jan 12, 2024 · In this adventure, we're not just scratching the surface; we're diving headfirst into ten real-world scenarios where subqueries shine. These are the SQL gems that will elevate your data wrangling skills, making you the maestro of complex database queries. So, …

  10. SQL Subquery: A Comprehensive Guide - DataCamp

    Jan 16, 2025 · SQL subqueries are a powerful tool in database management, allowing for more complex and efficient data retrieval. This guide will walk you through the fundamentals of SQL subqueries, offering insights into their practical applications and advanced techniques.

Refresh