Using the where clause in a sql query indicates the query conditions.
SQL WHERE clause
The WHERE clause is used to extract those records that meet the specified criteria.
SQL WHERE syntax
SELECT column_name,column_name FROM table_name WHERE column_name operator value;
Operators in the WHERE clause
The following operators can be used in the WHERE clause Used in:
Operator | Description |
---|---|
= | is equal to |
<> | is not equal to. Note: In some versions of SQL, this operator can be written as != |
> | is greater than |
< | is less than |
>= | is greater than or equal to |
<= | Less than or equal to |
BETWEEN | Within a certain range |
LIKE | Search for a pattern |
IN | Specify multiple possible values for a column |
Recommended: "SQL Video Tutorial"
The above is the detailed content of What is pointed out by using where clause in sql query. For more information, please follow other related articles on the PHP Chinese website!