The SQL WHERE syntax
A WHERE clause with a SELECT statement:
A WHERE clause with an UPDATE statement:
SET column-name = value
A WHERE clause with a DELETE statement:
SQL WHERE Clause Examples
List the customers in Sweden
SELECT Id, FirstName, LastName, City, Country, Phone
WHERE Country = 'Sweden'
Results: 2 records
Update the city to Sydney for supplier Pavlova, Ltd.
SET City = 'Sydney'
WHERE Name = 'Pavlova, Ltd.'
1 record updated.
Delete all products with unit price higher than $50.
DELETE FROM Product
WHERE UnitPrice > 50
7 records deleted.
Note: Referential integrity may prevent this deletion.
A better approach may be to discontinue the product, that is, set IsDiscontinued to true.