In today’s article, we will be cover about the use of the IN command, which is one of the Subquery types.
For Example:
Let’s find the values with 40, 25 and 38 vize grades in the ogrenci table.
1 |
SELECT * FROM ogrenci WHERE vize IN (40,25,38) ; |
In the above example, we have brought more than one query with the help of the IN command.
Can this be done without using the IN command?
Yes we can. We can do as follows by specifying more than one condition after the WHERE condition.
1 |
SELECT*FROM ogrenci WHERE vize=40 OR vize=25 OR vize=38; |
In the example above, we added the word OR between the column names after the WHERE condition and added more than one condition to get the same result.