SQL WHERE CLAUSE – SQL TUTORIAL | Software Testing Material


The SQL WHERE clause is used to specify a condition while fetching the data from a table. We use WHERE clause to filter the records and fetching only necessary records.

The WHERE clause is not only used in SELECT statement, but it is also used in UPDATE, DELETE statement, etc.,

SQL WHERE Clause Syntax:

You can specify a condition using comparison or logical operators like >, <, =, LIKE, NOT, etc.

SQL WHERE Clause Example:

In the below image, you could find total number of records related to first SELECT query are and total number of records are 2 related to second SELECT query.

In the second SELECT query, we used WHERE clause with the condition RUNS>20. Note: Runs greater than 20 doesn’t man Runs equal to 20. So in the result we could see just two records.

SQL Where Clause

In the next tutorial, we will see How To Use SELECT DISTINCT Query in SQL

Check out the complete SQL Tutorial by clicking on below link:

SQL Tutorial – Complete

Get our latest blog posts delivered to your inbox

Subscribe and get popular blog posts about software testing industry.


Leave a Comment

Share via
Copy link
Powered by Social Snap