Files
freeCodeCamp/guide/arabic/sql/sql-in-operator/index.md
2019-06-20 15:35:05 -05:00

52 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: SQL In Operator
localeTitle: مزود في المشغل
---
## مزود في المشغل
## في تعريف المشغل
يتم استخدام عامل التشغيل `IN` في `WHERE` أو `HAVING` (كجزء من `GROUP BY` ) لتحديد الصفوف المحددة إلى عناصر "IN" قائمة.
في ما يلي قائمة الطلاب الكاملة الحالية لمقارنة مجموعة نتائج `WHERE` :
```sql
select studentID, FullName, sat_score, rcd_updated from student;
```
```text
+-----------+------------------------+-----------+---------------------+
| studentID | FullName | sat_score | rcd_updated |
+-----------+------------------------+-----------+---------------------+
| 1 | Monique Davis | 400 | 2017-08-16 15:34:50 |
| 2 | Teri Gutierrez | 800 | 2017-08-16 15:34:50 |
| 3 | Spencer Pautier | 1000 | 2017-08-16 15:34:50 |
| 4 | Louis Ramsey | 1200 | 2017-08-16 15:34:50 |
| 5 | Alvin Greene | 1200 | 2017-08-16 15:34:50 |
| 6 | Sophie Freeman | 1200 | 2017-08-16 15:34:50 |
| 7 | Edgar Frank "Ted" Codd | 2400 | 2017-08-16 15:35:33 |
| 8 | Donald D. Chamberlin | 2400 | 2017-08-16 15:35:33 |
| 9 | Raymond F. Boyce | 2400 | 2017-08-16 15:35:33 |
+-----------+------------------------+-----------+---------------------+
9 rows in set (0.00 sec)
```
سيتم عرض الصفوف التي لها نقاط SAT في هذه القائمة (1000 ، 2400):
```sql
select studentID, FullName, sat_score, rcd_updated
from student
where sat_score in (1000, 2400);
```
```text
+-----------+------------------------+-----------+---------------------+
| studentID | FullName | sat_score | rcd_updated |
+-----------+------------------------+-----------+---------------------+
| 3 | Spencer Pautier | 1000 | 2017-08-16 15:34:50 |
| 7 | Edgar Frank "Ted" Codd | 2400 | 2017-08-16 15:35:33 |
| 8 | Donald D. Chamberlin | 2400 | 2017-08-16 15:35:33 |
| 9 | Raymond F. Boyce | 2400 | 2017-08-16 15:35:33 |
+-----------+------------------------+-----------+---------------------+
4 rows in set (0.00 sec)
```