Let us say we want to delete all employees from employee table who are fired. We will tell the SQL based database to delete some specific rows out of all the rows in the table. We specify those with the help of filters or WHERE clause.
I know how you are feeling. Enough theory !! 😠 Let us see SQL WHERE clause syntax with some examples in this SQL Tutorial.
👉 Let’s get started with 💓 SQL WHERE. Before that please go through the SQL Tables, Statements.
SQL WHERE Clause SYNTAX, Examples
SQL WHERE Syntax
SQL WHERE clause Example
SQL WHERE Clause String Filter
|SQL Where clause with string filters as a condition|
Please note that we have used two single quotes around the string. That is how Oracle understands the data is a VARCHAR2 or STRING.
SQL WHERE Clause Number Filter
|SQL Where with number data filter|
Here, min_salary > 5000 is the condition. Only those rows are fetched who satisfy the same condition. You can see in the figure that the min_salary column values are greater than 5000.