SQL WHERE

The SQL WHERE command is used to extract only those records that meet a certain condition. We can say that conditional select is used to make conditional selection from database.
<!--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
INTo specify multiple possible values ​​for a column



You can add multiple terms with AND and OR statements.
E.Albayrak

0 Yorum

Soru & Yorum


Web Tasarım

Renkli Kare

Web Tasarım Ajansı