SQL
AND & OR Operatörer
Sök…
Syntax
VÄLJ * FRÅN tabell VAR (villkor1) OCH (villkor2);
VÄLJ * FRÅN tabell VAR (villkor1) ELLER (villkor2);
OCH ELLER Exempel
Ha ett bord
| namn | Ålder | Stad |
|---|---|---|
| Guppa | 10 | paris |
| Matta | 20 | Berlin |
| Mary | 24 | prag |
select Name from table where Age>10 AND City='Prague'
ger
| namn |
|---|
| Mary |
select Name from table where Age=10 OR City='Prague'
ger
| namn |
|---|
| Guppa |
| Mary |
Modified text is an extract of the original Stack Overflow Documentation
Licensierat under CC BY-SA 3.0
Inte anslutet till Stack Overflow