ALL

SQL ALL Keyword

The ALL keyword is used with a comparison operator to return TRUE if the comparison is true for all values returned by a subquery.

Tutorials dojo strip

SQL ALL Syntax

The operator can be: =, !=, >, <, >=, <=

SQL

SQL ALL Example

This query attempts to select patients whose patient_id matches all the patient IDs from the Appointments table with a specific doctor_id (e.g. 1):

SQL

Important: The ALL keyword with subqueries causes a syntax error in our playground environment.
You will see: near "ALL": syntax error.
This feature is not supported, and you should use alternative approaches such as IN, JOIN, or NOT EXISTS where applicable.

SQL ALL Labs

Tutorials dojo strip
Tutorials dojo strip