SQL
Opérateurs ET & OU
Recherche…
Syntaxe
SELECT * FROM table WHERE (condition1) AND (condition2);
SELECT * FROM table WHERE (condition1) OU (condition2);
ET OU Exemple
Avoir une table
| prénom | Âge | Ville |
|---|---|---|
| Bob | dix | Paris |
| Tapis | 20 | Berlin |
| Marie | 24 | Prague |
select Name from table where Age>10 AND City='Prague'
Donne
| prénom |
|---|
| Marie |
select Name from table where Age=10 OR City='Prague'
Donne
| prénom |
|---|
| Bob |
| Marie |
Modified text is an extract of the original Stack Overflow Documentation
Sous licence CC BY-SA 3.0
Non affilié à Stack Overflow