WHERE
WHERE clause in SQL is a data manipulation language (DML) statement. WHERE clause is used in filter the records based on satisfying specific condition(s).
Syntax-
SELECT column_name1, column_name2, โฆcolumn_nameN
FROM <table_name>
WHERE <condition>;
Example-
SELECT CustomerName FROM Customers
WHERE Country=โGermanyโ;
Description-
The records having values from column_name1, column_name2, โฆcolumn_nameN will be filtered and retrieved from table_name on meeting the condition provided with WHERE clause. Above example will provide the name of customers from column CustomerName where value in corresponding column matches to Germany.
Note-
Northwind sample database is used for example.
Leave a Reply