<!--The database query below will show us all the lessons in class 4a. Here we have created a condition for the class column.-->
SELECT * FROM dersler WHERE class='4a';
<!--If the content of the column consists of numbers only, we can write without quotes.-->
SELECT * FROM lesson WHERE class=4; // records with equal
SELECT * FROM lesson WHERE class>4; // Records greater than 4
SELECT * FROM lesson WHERE class!=4; // 4 unequal records
The operators we will use when we want to make a conditional select are as follows.
= | Equals |
> | Is greater |
< | Is smaller |
>= | Big and Equal |
<= | Small and Equal |
!= | Does Not Equal |
BETWEEN | Number or text within a specified range |
LIKE | Check whether the specified call is in content |
IN | To specify multiple possible values for a column |
You can add multiple terms with AND and OR statements.