WHERE
clause is used to extract only those records that fulfill a specified condition. SELECT column_name FROM table_name WHERE column_name operator value
The SQL query using the WHERE
clause in SELECT
statement, after that we'll execute this query through passing it to the PHP mysqli_query()
function to get the filtered data.
You can use one or more tables separated by comma to include various conditions using a WHERE
clause, but WHERE
clause is an optional part of SELECT
command.
You can specify more than one conditions using AND or OR operators.
A WHERE
clause can be used along with DELETE
or UPDATE
SQL command also to specify a condition.
The WHERE
clause works like an if condition in any programming language. This clause is used to compare given value with the field value available in MySQLi
table.
id | Name | College | Email Id | Mobile |
---|---|---|---|---|
1 | V V Ramana Reddy | S V Arts and Science College | info@freetimelearning.com | 9963666068 |
2 | Chanti | Vidhyalaya Degree College | freetimelearn@gmail.com | 9010023210 |
3 | Ramana | S V University | vvramanareddy9963@gmail.com | 9966463846 |
4 | Suresh | Aadhishankara | sureshreddy@gmail.com | 9700900292 |
5 | Suman Reddy | Priyadharshini | sumanreddy.mca@gmail.com | 9966395199 |