The WHERE clause is used for filtering rows.
Simplified syntax is:
SELECT column(s) FROM table WHERE column_name operator value
Standard SQL support these operators:
You can try these commands in DatAdmin console. Try to modify it and see results
SELECT * FROM Customer WHERE Country = 'Germany'
SELECT * FROM Customer WHERE Email LIKE '%.de'
SELECT * FROM InvoiceLine WHERE UnitPrice > 1
SELECT * FROM Employee WHERE Employee.BirthDate BETWEEN '1970-01-01 00:00:00' AND '1980-01-01 00:00:00'
SELECT * FROM Customer WHERE Country IN ('Germany', 'Czech Republic')
You can combine conditions using AND and OR conjuctions.
Last condition can be also with the some meaning rewritten as:
SELECT * FROM Employee WHERE Employee.BirthDate >= '1970-01-01 00:00:00' AND Employee.BirthDate <= '1980-01-01 00:00:00'
Post new comment