Professional Documents
Culture Documents
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C
WHERE Syntax
Note: The WHERE clause is not only used in SELECT statements, it is also used in
UPDATE , DELETE , etc.!
Demo Database
Below is a selection from the "Customers" table in the Northwind sample database:
CustomerID
Tutorials Exercises Services
CustomerName ContactName
Address
Sign Up
City
Log in
PostalCod
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C
1 Alfreds Maria Anders Obere Str. 57 Berlin 12209
Futterkiste
4 Around the Horn Thomas Hardy 120 Hanover London WA1 1DP
Sq.
Try it Yourself »
HTML CSSnumeric
However, JAVASCRIPT
fields shouldSQL
not bePYTHON
enclosed inJAVA
quotes: PHP HOW TO W3.CSS C
Example
SELECT * FROM Customers
WHERE CustomerID = 1;
Try it Yourself »
= Equal Try it
<> Not equal. Note: In some versions of SQL this operator Try it
may be written as !=
TestCSS
HTML
Yourself With
JAVASCRIPT SQL
Exercises
PYTHON JAVA PHP HOW TO W3.CSS C
Exercise:
Select all records where the City column has the value "Berlin".
Submit Answer »
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C
COLOR PICKER
Tutorials Exercises Services Sign Up Log in
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C
FORUM ABOUT
W3Schools is optimized for learning and training. Examples might be simplified to
improve reading and learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we
cannot warrant full correctness
of all content. While using W3Schools, you agree to have read and accepted our terms of
use, cookie and privacy policy.
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C