‘Where’ as a word is used to distinguish a place or position and that’s exactly what the SQL Where clause does. Where in SQL is used to specify a condition while fetching the data. The Where in SQL fetches only the necessary records.
Watch this Where in SQL video
Where in SQL is used to filter records on the basis of a condition, or it is used to extract records which satisfy a condition.
In this example, we want to extract those records where the age of a person is more than fifty or sixty out of those records where the occupation of the person is a doctor.
SELECT column1, column2, columnN FROM tablename WHERE [condition];
where SELECT, FROM, and WHERE are the keywords; column1 to columnN are a set of columns; tablename is the name of the table, and there is a condition followed by a semicolon.
This bring us to the end of this where in SQL. In the next tutorial section, we will discuss on the imposed operators used with the Where clause, which will help users filter data using multiple constraints.
Download Interview Questions asked by top MNCs in 2019?