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