Showing posts with label Sub-Query. Show all posts
Showing posts with label Sub-Query. Show all posts

Friday, January 12, 2024

SQL Sub-Queries| Types of Sub-Queries | Non-correlated Sub-Query | Correlated Sub-Query| Exists | Non-Exists | Oracle SQL | SQL

 Sub Queries

Using a Sub-query :

Main Query: Which employees have salaries greater than Abel’s salary?

Subquery: What is Abel’s salary?

 Sub-query syntax :

The subquery (inner query) executes once before the main query.

The result of the subquery is used by the main query (outer query).