Tag: greater than or equal to MYSQ search validation order by database where SEL nbsp
Specifying search criteria using the WHERE clause of the SELECT statement
In the SELECT statement, the data is filtered according to the search criteria specified in the WHERE clause, given after the table name
SELECT column name 1, column name 2 from table name WHERE condition;
Condition is a specific value of the data in the column
WHERE clause position
SELECT + from + WHERE + ORDER by
WHERE clause operator
Operator description
= equals
<> Not equal to
! = does not equal
< less than
<= less than or equal to
> Greater than
>= greater than or equal to
Between between the specified two values
Check individual values
SELECT column name 1, column name 2 from table name WHERE column name 1 operator (<,;, =) column data;
Mismatch check
SELECT column name 1, column name 2 from table name where column name 1 <> column value;
Range value Check
SELECT column name 1, column name 2 from table name WHERE column Name 1 between value 1 and value 2;
Null value Check
SELECT column name from table name WHERE column name is NULL;
Null and mismatched when you select a column that does not have a specific value by filtering, you may want to return a row that has a null value. However, no, because the unknown has a special meaning, the database does not know whether they match, so they are not returned when matching filtering or mismatched filtering.
Therefore, when filtering data, be sure to verify that the returned data does give a row with NULL in the filtered column.
[MySQL] Filtering data