English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Utilizzo e esempio del comando ALL SQL

Riferimento delle parole chiave SQL

ALL

Se tutti i valori delle sottosql soddisfano i requisiti, il comando ALL restituisce true.

Se tutti i record nella tabella OrderDetails hanno una quantità di 10, la seguente query SQL restituisce TRUE e elenca il nome del prodotto:

  SELECT ProductName
FROM Products
WHERE ProductID = ALL (SELECT ProductID FROM OrderDetails WHERE Quantity = 10);

Riferimento delle parole chiave SQL