MySQL All Operator

Profile picture for user arilio666

The All operator in MySQL, likewise the ANY operator, returns a boolean value. Only returns TRUE if all the subquery values meet the condition. ALL operator can be used with SELECT, WHERE and HAVING statements.

As the word suggests, ALL means that the condition should likely satisfy all the subsequent queries and only returns TRUE if all the values within the range are TRUE.

Syntax

SELECT ALL column name
FROM tablename
WHERE condition;

Example

We will be using a table called actor.

all operator in mysql

select ALL first_name from actor;

Selects all from column first_name in the actor table.

mysql all operator

Tags