zmień kontrast font size: A A A
rss polski
you are at Encyclopedia of SQL >> WHERE

WHERE

WHERE is used to limit results of query with using conditions after this keyword.

Syntax


SELECT `column_name`
FROM `table_name`
WHERE `column_name` operator 'value'

There is list of operators: = , <> or != ( not equal ), < , > , <= , >= , BETWEEN , LIKE ,IN

Example

Display name and surname of people with age above 6

namesurnameage
PawełKowalski3
PiotrJanik7
MichałNowak13

query


SELECT `name`,`surname`
FROM `people`
WHERE `age` > 6

result

namesurname
PiotrJanik
MichałNowak

[ wróć na górę strony ]